peer: increase initial handshake timeout to 15 seconds
This commit is contained in:
parent
5442e42cc1
commit
b51a0eb094
4
peer.go
4
peer.go
@ -304,8 +304,8 @@ func (p *peer) Start() error {
|
|||||||
|
|
||||||
select {
|
select {
|
||||||
// In order to avoid blocking indefinitely, we'll give the other peer
|
// 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.
|
// an upper timeout of 15 seconds to respond before we bail out early.
|
||||||
case <-time.After(time.Second * 5):
|
case <-time.After(time.Second * 15):
|
||||||
return fmt.Errorf("peer did not complete handshake within 5 " +
|
return fmt.Errorf("peer did not complete handshake within 5 " +
|
||||||
"seconds")
|
"seconds")
|
||||||
case err := <-readErr:
|
case err := <-readErr:
|
||||||
|
Loading…
Reference in New Issue
Block a user