Merge pull request #792 from lucas-clemente/fix-441

add a quic.Config option to configure the idle timeout
This commit is contained in:
Marten Seemann
2017-08-29 18:48:56 +07:00
committed by GitHub
13 changed files with 78 additions and 46 deletions

View File

@@ -129,6 +129,10 @@ func populateServerConfig(config *Config) *Config {
if config.HandshakeTimeout != 0 {
handshakeTimeout = config.HandshakeTimeout
}
idleTimeout := protocol.DefaultIdleTimeout
if config.IdleTimeout != 0 {
idleTimeout = config.IdleTimeout
}
maxReceiveStreamFlowControlWindow := config.MaxReceiveStreamFlowControlWindow
if maxReceiveStreamFlowControlWindow == 0 {
@@ -142,6 +146,7 @@ func populateServerConfig(config *Config) *Config {
return &Config{
Versions: versions,
HandshakeTimeout: handshakeTimeout,
IdleTimeout: idleTimeout,
AcceptSTK: vsa,
MaxReceiveStreamFlowControlWindow: maxReceiveStreamFlowControlWindow,
MaxReceiveConnectionFlowControlWindow: maxReceiveConnectionFlowControlWindow,