fix: remove response header timeout (#8919)

Adding respone header timeout seems to have
premature timeout like consequences which
leads to potential disconnections.
This commit is contained in:
Harshavardhana 2020-02-01 08:31:55 +05:30 committed by GitHub
parent bfe8a9bccc
commit d7dc9aaf52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,12 +427,10 @@ func newCustomHTTPTransport(tlsConfig *tls.Config, dialTimeout, dialKeepAlive ti
tr := &http.Transport{ tr := &http.Transport{
Proxy: http.ProxyFromEnvironment, Proxy: http.ProxyFromEnvironment,
DialContext: newCustomDialContext(dialTimeout, dialKeepAlive), DialContext: newCustomDialContext(dialTimeout, dialKeepAlive),
MaxIdleConns: 256,
MaxIdleConnsPerHost: 256, MaxIdleConnsPerHost: 256,
IdleConnTimeout: 30 * time.Second, IdleConnTimeout: 60 * time.Second,
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second,
ResponseHeaderTimeout: 10 * time.Second, ExpectContinueTimeout: 10 * time.Second,
ExpectContinueTimeout: 3 * time.Second,
TLSClientConfig: tlsConfig, TLSClientConfig: tlsConfig,
// Go net/http automatically unzip if content-type is // Go net/http automatically unzip if content-type is
// gzip disable this feature, as we are always interested // gzip disable this feature, as we are always interested