p2p: set empty timeouts to small values. (#8847)

These timeouts default to 'do not time out' if they are not set. This times up resources, potentially indefinitely. If node on the other side of the the handshake is up but unresponsive, the[ handshake call](edec79448a/internal/p2p/router.go (L720)) will _never_ return.
This commit is contained in:
William Banfield
2022-06-23 18:33:21 -04:00
committed by William Banfield
parent 2e52e25c6c
commit 49cbf6f1b7
12 changed files with 65 additions and 45 deletions

View File

@@ -1246,7 +1246,9 @@ func createAndStartPrivValidatorGRPCClient(
func getRouterConfig(conf *config.Config, proxyApp proxy.AppConns) p2p.RouterOptions {
opts := p2p.RouterOptions{
QueueType: conf.P2P.QueueType,
QueueType: conf.P2P.QueueType,
HandshakeTimeout: conf.P2P.HandshakeTimeout,
DialTimeout: conf.P2P.DialTimeout,
}
if conf.P2P.MaxNumInboundPeers > 0 {