mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
Merge pull request #8508 from vbatts/vbatts-too_many_open_files
cleaner handling of client socket access Upstream-commit: 7fa7c42ce2f151d438ad83fd2dcd5a0679015618 Component: engine
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user