mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
registry: newTransport: remove intermediate var
Align closer to other code doing the same. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -138,15 +138,13 @@ func newTransport(tlsConfig *tls.Config) http.RoundTripper {
|
||||
tlsConfig = tlsconfig.ServerDefault()
|
||||
}
|
||||
|
||||
direct := &net.Dialer{
|
||||
Timeout: 30 * time.Second,
|
||||
KeepAlive: 30 * time.Second,
|
||||
}
|
||||
|
||||
return otelhttp.NewTransport(
|
||||
&http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
DialContext: direct.DialContext,
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
DialContext: (&net.Dialer{
|
||||
Timeout: 30 * time.Second,
|
||||
KeepAlive: 30 * time.Second,
|
||||
}).DialContext,
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
TLSClientConfig: tlsConfig,
|
||||
// TODO(dmcgowan): Call close idle connections when complete and use keep alive
|
||||
|
||||
Reference in New Issue
Block a user