refactor: remove no longer needed TLS handshake timeout

Since the whole resolve has a context w/ deadline it's no longer needed.
This commit is contained in:
ThinkChaos 2023-11-22 10:34:57 -05:00
parent a6654dcd57
commit 603d374405
1 changed files with 4 additions and 6 deletions

View File

@ -24,9 +24,8 @@ import (
)
const (
dnsContentType = "application/dns-message"
defaultTLSHandshakeTimeout = 5 * time.Second
retryAttempts = 3
dnsContentType = "application/dns-message"
retryAttempts = 3
)
type upstreamConfig struct {
@ -94,9 +93,8 @@ func createUpstreamClient(cfg upstreamConfig) upstreamClient {
userAgent: cfg.UserAgent,
client: &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tlsConfig,
TLSHandshakeTimeout: defaultTLSHandshakeTimeout,
ForceAttemptHTTP2: true,
TLSClientConfig: &tlsConfig,
ForceAttemptHTTP2: true,
},
},
host: cfg.Host,