mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
peer: increase initial handshake timeout to 15 seconds
This commit is contained in:
parent
5442e42cc1
commit
b51a0eb094
1 changed files with 2 additions and 2 deletions
4
peer.go
4
peer.go
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue