From 101752c59df1df337555226743187420e5af2154 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Mon, 15 Aug 2022 15:41:12 +0300 Subject: [PATCH] Pull request: Fix #260: enable KeepAlive for DoQ Merge in DNS/dnsproxy from doq_keepalive to master Squashed commit of the following: commit 401d87a3eb1159730f8963577037456b6ffe2d48 Author: Andrey Meshkov Date: Mon Aug 15 10:27:57 2022 +0300 Fix #260: enable KeepAlive for DoQ --- upstream/upstream_quic.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upstream/upstream_quic.go b/upstream/upstream_quic.go index 36508c00b..b27062f6a 100644 --- a/upstream/upstream_quic.go +++ b/upstream/upstream_quic.go @@ -220,7 +220,9 @@ func (p *dnsOverQUIC) openConnection() (conn quic.Connection, err error) { } addr := udpConn.RemoteAddr().String() - quicConfig := &quic.Config{} + quicConfig := &quic.Config{ + KeepAlive: true, + } conn, err = quic.DialAddrContext(context.Background(), addr, tlsConfig, quicConfig) if err != nil { return nil, fmt.Errorf("opening quic connection to %s: %w", p.Address(), err)