Skip to content

Commit

Permalink
refactor: remove no longer needed TLS handshake timeout
Browse files Browse the repository at this point in the history
Since the whole resolve has a context w/ deadline it's no longer needed.
  • Loading branch information
ThinkChaos committed Dec 6, 2023
1 parent a6654dc commit 603d374
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions resolver/upstream_resolver.go
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 603d374

Please sign in to comment.