decred / dcrwallet

A secure Decred wallet daemon written in Go (golang).
https://decred.org
ISC License
212 stars 153 forks source link

p2p: avoid strange context timeout wrapping #2333

Closed jrick closed 4 months ago

jrick commented 4 months ago

It reads better to have a dial timeout of 10s followed by a handshake with a 5s timeout, instead of relying on the outer context wrapping in a 30s overall timeout to connectOutbound.

The previous code could allow a handshake up to 20s but this was only to deal with the potential of there being reconnect attempts, which are now gone.