Remove unused parameter (#1499)

Pretty confusing that the connTimeout parameter isn't actually respected, better to remove it
This commit is contained in:
Julian Friedman 2020-07-15 18:47:33 +01:00 committed by GitHub
parent 9f3fb07346
commit 3aca29a4b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ func dialBackOffHelper(ctx context.Context, network, address string, bo wait.Bac
return nil, fmt.Errorf("timed out dialing after %.2fs", elapsed.Seconds())
}
func newHTTPTransport(connTimeout time.Duration, disableKeepAlives bool) http.RoundTripper {
func newHTTPTransport(disableKeepAlives bool) http.RoundTripper {
return &http.Transport{
// Those match net/http/transport.go
Proxy: http.ProxyFromEnvironment,
@ -112,7 +112,7 @@ func newHTTPTransport(connTimeout time.Duration, disableKeepAlives bool) http.Ro
// since it will not cache connections.
func NewProberTransport() http.RoundTripper {
return newAutoTransport(
newHTTPTransport(DefaultConnTimeout, true /*disable keep-alives*/),
newHTTPTransport(true /*disable keep-alives*/),
NewH2CTransport())
}
@ -120,7 +120,7 @@ func NewProberTransport() http.RoundTripper {
// based on the request's HTTP version.
func NewAutoTransport() http.RoundTripper {
return newAutoTransport(
newHTTPTransport(DefaultConnTimeout, false /*disable keep-alives*/),
newHTTPTransport(false /*disable keep-alives*/),
NewH2CTransport())
}