peer: increase initial handshake timeout to 15 seconds

This commit is contained in:
Olaoluwa Osuntokun 2017-04-13 14:48:38 -07:00
parent 5442e42cc1
commit b51a0eb094
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 2 additions and 2 deletions

View File

@ -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: