From 698862ec5d2ef7c1b4c6140f8720f2d25c5d7f11 Mon Sep 17 00:00:00 2001 From: Aditya Manthramurthy Date: Tue, 17 Jan 2023 20:36:38 -0800 Subject: [PATCH] Fix transports/timeouts related regressions (#16427) --- cmd/utils.go | 4 ++-- internal/http/transports.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/utils.go b/cmd/utils.go index e90d4e972..d995f5042 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -608,7 +608,7 @@ func NewCustomHTTPProxyTransport() func() *http.Transport { func NewHTTPTransportWithClientCerts(clientCert, clientKey string) *http.Transport { s := xhttp.ConnSettings{ DNSCache: globalDNSCache, - DialTimeout: 1 * time.Minute, + DialTimeout: defaultDialTimeout, RootCAs: globalRootCAs, EnableHTTP2: false, } @@ -676,7 +676,7 @@ func NewRemoteTargetHTTPTransport() func() *http.Transport { DialContext: newCustomDialContext(), RootCAs: globalRootCAs, EnableHTTP2: false, - }.NewCustomHTTPProxyTransport() + }.NewRemoteTargetHTTPTransport() } // Load the json (typically from disk file). diff --git a/internal/http/transports.go b/internal/http/transports.go index d2c5014be..1da7376ba 100644 --- a/internal/http/transports.go +++ b/internal/http/transports.go @@ -113,8 +113,8 @@ func (s ConnSettings) NewInternodeHTTPTransport() func() http.RoundTripper { tr := s.getDefaultTransport() // Settings specific to internode requests. - tr.TLSHandshakeTimeout = 15 * time.Minute - tr.ExpectContinueTimeout = 15 * time.Minute + tr.TLSHandshakeTimeout = 15 * time.Second + tr.ExpectContinueTimeout = 15 * time.Second return func() http.RoundTripper { return tr