Merge pull request #8508 from vbatts/vbatts-too_many_open_files
cleaner handling of client socket access
This commit is contained in:
commit
7fa7c42ce2
1 changed files with 8 additions and 0 deletions
|
@ -40,6 +40,14 @@ func (cli *DockerCli) HTTPClient() *http.Client {
|
|||
return net.DialTimeout(cli.proto, cli.addr, 32*time.Second)
|
||||
},
|
||||
}
|
||||
if cli.proto == "unix" {
|
||||
// XXX workaround for net/http Transport which caches connections, but is
|
||||
// intended for tcp connections, not unix sockets.
|
||||
tr.DisableKeepAlives = true
|
||||
|
||||
// no need in compressing for local communications
|
||||
tr.DisableCompression = true
|
||||
}
|
||||
return &http.Client{Transport: tr}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue