set the handshake timeout to twice the handshake idle timeout (#4063)

This commit is contained in:
Marten Seemann
2023-09-09 20:12:37 +07:00
committed by GitHub
parent 54b76ceb3e
commit e1fcac3e46
6 changed files with 7 additions and 15 deletions

View File

@@ -250,7 +250,8 @@ type Config struct {
// If not set, it uses all versions available.
Versions []VersionNumber
// HandshakeIdleTimeout is the idle timeout before completion of the handshake.
// Specifically, if we don't receive any packet from the peer within this time, the connection attempt is aborted.
// If we don't receive any packet from the peer within this time, the connection attempt is aborted.
// Additionally, if the handshake doesn't complete in twice this time, the connection attempt is also aborted.
// If this value is zero, the timeout is set to 5 seconds.
HandshakeIdleTimeout time.Duration
// MaxIdleTimeout is the maximum duration that may pass without any incoming network activity.