From 10f8f5dd7b7f48ee340d58c4c61d01c3b4edf9c4 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Fri, 15 Jul 2022 21:57:50 +0800 Subject: [PATCH] chore: Increase idle timeout and add keep alive period --- dns/doq.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dns/doq.go b/dns/doq.go index 98776104..7807de1c 100644 --- a/dns/doq.go +++ b/dns/doq.go @@ -142,7 +142,8 @@ func (dc *quicClient) openConnection(ctx context.Context) (quic.Connection, erro ConnectionIDLength: 12, HandshakeIdleTimeout: time.Second * 8, MaxIncomingStreams: 4, - MaxIdleTimeout: time.Second * 30, + KeepAlivePeriod: 10 * time.Second, + MaxIdleTimeout: time.Second * 120, } log.Debugln("opening new connection to %s", dc.addr)