Fix transports/timeouts related regressions (#16427)

This commit is contained in:
Aditya Manthramurthy 2023-01-17 20:36:38 -08:00 committed by GitHub
parent b4ef5ff294
commit 698862ec5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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).

View File

@ -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