From 3b1aaa9a3dba98e79bd52087a9b85fb5f86ccc3f Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 28 Nov 2018 23:14:41 +0100 Subject: [PATCH] update quic parameters --- transport/internet/quic/conn.go | 1 - transport/internet/quic/dialer.go | 10 +++------- transport/internet/quic/hub.go | 4 ++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/transport/internet/quic/conn.go b/transport/internet/quic/conn.go index b49261ab9..a5b7ccf9e 100644 --- a/transport/internet/quic/conn.go +++ b/transport/internet/quic/conn.go @@ -182,7 +182,6 @@ func (c *interConn) Write(b []byte) (int, error) { } func (c *interConn) Close() error { - c.stream.CancelRead(0x00) return c.stream.Close() } diff --git a/transport/internet/quic/dialer.go b/transport/internet/quic/dialer.go index 97c306cc4..d4296b56e 100644 --- a/transport/internet/quic/dialer.go +++ b/transport/internet/quic/dialer.go @@ -147,13 +147,9 @@ func (s *clientSessions) openConnection(destAddr net.Addr, config *Config, tlsCo } quicConfig := &quic.Config{ - ConnectionIDLength: 12, - HandshakeTimeout: time.Second * 8, - IdleTimeout: time.Second * 120, - MaxIncomingUniStreams: -1, - MaxIncomingStreams: -1, - MaxReceiveStreamFlowControlWindow: 256 * 1024, - MaxReceiveConnectionFlowControlWindow: 2 * 1024 * 1024, + ConnectionIDLength: 12, + HandshakeTimeout: time.Second * 8, + IdleTimeout: time.Second * 30, } conn, err := wrapSysConn(rawConn, config) diff --git a/transport/internet/quic/hub.go b/transport/internet/quic/hub.go index f73c19d7b..f95760518 100644 --- a/transport/internet/quic/hub.go +++ b/transport/internet/quic/hub.go @@ -103,8 +103,8 @@ func Listen(ctx context.Context, address net.Address, port net.Port, streamSetti quicConfig := &quic.Config{ ConnectionIDLength: 12, HandshakeTimeout: time.Second * 8, - IdleTimeout: time.Second * 120, - MaxIncomingStreams: 256, + IdleTimeout: time.Second * 30, + MaxIncomingStreams: 32, MaxIncomingUniStreams: -1, }