Skip to content

Commit

Permalink
peer: increase initial handshake timeout to 15 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Apr 13, 2017
1 parent 5442e42 commit b51a0eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ func (p *peer) Start() error {

select {
// In order to avoid blocking indefinitely, we'll give the other peer
// an upper timeout of 5 seconds to respond before we bail out early.
case <-time.After(time.Second * 5):
// an upper timeout of 15 seconds to respond before we bail out early.
case <-time.After(time.Second * 15):
return fmt.Errorf("peer did not complete handshake within 5 " +
"seconds")
case err := <-readErr:
Expand Down

0 comments on commit b51a0eb

Please sign in to comment.