From 9074b78e36e97ccb83f9e004eb2a24c330226127 Mon Sep 17 00:00:00 2001 From: 5aaee9 <7685264+5aaee9@users.noreply.github.com> Date: Mon, 10 Feb 2025 15:21:18 +0800 Subject: [PATCH] chore(dns): increase MaxConnsPerHost (#1834) --- dns/doh.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dns/doh.go b/dns/doh.go index 027afd58..50c72109 100644 --- a/dns/doh.go +++ b/dns/doh.go @@ -37,13 +37,14 @@ const ( transportDefaultIdleConnTimeout = 5 * time.Minute // dohMaxConnsPerHost controls the maximum number of connections for - // each host. - dohMaxConnsPerHost = 1 + // each host. Note, that setting it to 1 may cause issues with Go's http + // implementation, see https://github.com/AdguardTeam/dnsproxy/issues/278. + dohMaxConnsPerHost = 2 dialTimeout = 10 * time.Second // dohMaxIdleConns controls the maximum number of connections being idle // at the same time. - dohMaxIdleConns = 1 + dohMaxIdleConns = 2 maxElapsedTime = time.Second * 30 )