Skip to content

Commit

Permalink
Merge "[FAB-13602] Fix time.Timer leak in gossip handshake" into rele…
Browse files Browse the repository at this point in the history
…ase-1.4
  • Loading branch information
yacovm authored and Gerrit Code Review committed Jan 11, 2019
2 parents ec8d9ea + 481ae97 commit 8faadaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gossip/comm/comm_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,8 @@ func readWithTimeout(stream interface{}, timeout time.Duration, address string)
}
}()
select {
case <-time.NewTicker(timeout).C:
return nil, errors.Errorf("Timed out waiting for connection message from %s", address)
case <-time.After(timeout):
return nil, errors.Errorf("timed out waiting for connection message from %s", address)
case m := <-incChan:
return m, nil
case err := <-errChan:
Expand Down

0 comments on commit 8faadaf

Please sign in to comment.