fn: keepalives timeout for UDS http-stream client (#1253)

This commit is contained in:
Tolga Ceylan
2018-09-28 10:59:22 -07:00
committed by GitHub
parent f94999500f
commit a256d96f1e

View File

@@ -965,6 +965,7 @@ func (a *agent) runHot(ctx context.Context, call *call, tok ResourceToken, state
udsClient = http.Client{
Transport: &http.Transport{
// XXX(reed): other settings ?
IdleConnTimeout: 1 * time.Second,
DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) {
var d net.Dialer
return d.DialContext(ctx, "unix", filepath.Join(container.UDSAgentPath(), udsFilename))