distribution: http.Transport use keep alive

registry client's http.Transport use keep alive. fix TODO(dmcgowan):
Call close idle connections when complete, use keep alive

Signed-off-by: HuanHuan Ye <logindaveye@gmail.com>
This commit is contained in:
HuanHuan Ye
2019-12-11 17:30:52 +08:00
parent 1347481b9e
commit 1d4a6cfd0d

View File

@@ -71,14 +71,11 @@ func NewV2Repository(
DualStack: true,
}
// TODO(dmcgowan): Call close idle connections when complete, use keep alive
base := &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: direct.DialContext,
TLSHandshakeTimeout: 10 * time.Second,
TLSClientConfig: endpoint.TLSConfig,
// TODO(dmcgowan): Call close idle connections when complete and use keep alive
DisableKeepAlives: true,
}
modifiers := registry.Headers(dockerversion.DockerUserAgent(ctx), metaHeaders)