brontide: decrease handshake timeout to 1s

This commit is contained in:
Olaoluwa Osuntokun committed 2018-04-02 15:56:47 -07:00
1 parent 138da98df6
commit d82f67cc1d
3 files changed
+13 -6

No files matched your search

+2 -2
View File
@@ -59,9 +59,9 @@ func Dial(localPriv *btcec.PrivateKey, netAddr *lnwire.NetAddress,
}
// We'll ensure that we get ActTwo from the remote peer in a timely
// manner. If they don't respond within 15 seconds, then we'll kill the
// manner. If they don't respond within 1s, then we'll kill the
// connection.
conn.SetReadDeadline(time.Now().Add(time.Second * 15))
conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
// If the first act was successful (we know that address is actually
// remotePub), then read the second act after which we'll be able to