p2p: set empty timeouts to configed values. (manual backport of #8847) (#8869)

* regenerate mocks using newer style

* 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](https://github.com/tendermint/tendermint/blob/edec79448aa1d62b84683b1b22e12e145dbdda7c/internal/p2p/router.go#L720) will _never_ return.

* fix light client select statement
This commit is contained in:
William Banfield
2022-06-28 16:07:15 -04:00
committed by GitHub
parent c4ef566071
commit 978f754ad3
31 changed files with 354 additions and 51 deletions
+3 -1
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 {