From 0ba9f2f6db0562f63e55ca3710b74303774a5fe8 Mon Sep 17 00:00:00 2001 From: ayanamist Date: Thu, 30 Jul 2026 14:05:05 +0800 Subject: [PATCH] chore: remove dohMaxConnsPerHost & dohMaxIdleConns (#3048) --- dns/doh.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/dns/doh.go b/dns/doh.go index 88c14e27..690973f3 100644 --- a/dns/doh.go +++ b/dns/doh.go @@ -36,15 +36,8 @@ const ( // connections in HTTP transport. transportDefaultIdleConnTimeout = 5 * time.Minute - // dohMaxConnsPerHost controls the maximum number of connections for - // 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 = 2 maxElapsedTime = time.Second * 30 ) @@ -394,8 +387,6 @@ func (doh *dnsOverHTTPS) createTransport(ctx context.Context) (t http.RoundTripp DisableCompression: true, DialContext: doh.dialer.DialContext, IdleConnTimeout: transportDefaultIdleConnTimeout, - MaxConnsPerHost: dohMaxConnsPerHost, - MaxIdleConns: dohMaxIdleConns, } if doh.url.Scheme == "http" {