Constant zebra_network::constants::HANDSHAKE_TIMEOUT
source · pub const HANDSHAKE_TIMEOUT: Duration;
Expand description
The timeout for connections and handshakes when connecting to new peers.
Outbound TCP connections must complete within this timeout,
then the handshake messages get an additional HANDSHAKE_TIMEOUT
to complete.
(Inbound TCP accepts can’t have a timeout, because they are handled by the OS.)
This timeout should remain small, because it helps stop slow peers getting into the peer set. This is particularly important for network-constrained nodes, and on testnet.