mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Disabled HTTP keep-alive in the default HTTP client for Registry calls
This commit is contained in:
parent
82dd963e08
commit
cff3b37a61
1 changed files with 7 additions and 1 deletions
|
@ -477,9 +477,15 @@ func NewRegistry(root string) *Registry {
|
||||||
// If the auth file does not exist, keep going
|
// If the auth file does not exist, keep going
|
||||||
authConfig, _ := auth.LoadConfig(root)
|
authConfig, _ := auth.LoadConfig(root)
|
||||||
|
|
||||||
|
httpTransport := &http.Transport{
|
||||||
|
DisableKeepAlives: true,
|
||||||
|
}
|
||||||
|
|
||||||
r := &Registry{
|
r := &Registry{
|
||||||
authConfig: authConfig,
|
authConfig: authConfig,
|
||||||
client: &http.Client{},
|
client: &http.Client{
|
||||||
|
Transport: httpTransport,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
r.client.Jar = cookiejar.NewCookieJar()
|
r.client.Jar = cookiejar.NewCookieJar()
|
||||||
return r
|
return r
|
||||||
|
|
Loading…
Add table
Reference in a new issue