Limit connection pool size on UDS: we should only need one per container (#1252)

Hopefully this reduces FD usage even further.
This commit is contained in:
Dario Domizioli
2018-09-28 19:07:31 +01:00
committed by Reed Allman
parent a256d96f1e
commit 4a862212a2

View File

@@ -964,6 +964,8 @@ func (a *agent) runHot(ctx context.Context, call *call, tok ResourceToken, state
udsClient = http.Client{
Transport: &http.Transport{
MaxIdleConns: 1,
MaxIdleConnsPerHost: 1,
// XXX(reed): other settings ?
IdleConnTimeout: 1 * time.Second,
DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) {