Skip to content

Commit ab49a4b

Browse files
committed
Set KeepAlive
Signed-off-by: Alex Ellis <[email protected]>
1 parent 7bd2fe0 commit ab49a4b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

functions/http_runner.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,12 @@ func makeProxyClient(dialTimeout time.Duration) *http.Client {
129129
Proxy: http.ProxyFromEnvironment,
130130
DialContext: (&net.Dialer{
131131
Timeout: dialTimeout,
132-
KeepAlive: 1,
132+
KeepAlive: 10 * time.Second,
133133
}).DialContext,
134-
MaxIdleConns: 1,
135-
DisableKeepAlives: true,
136-
IdleConnTimeout: 120 * time.Millisecond,
134+
MaxIdleConns: 100,
135+
MaxIdleConnsPerHost: 100,
136+
DisableKeepAlives: false,
137+
IdleConnTimeout: 500 * time.Millisecond,
137138
ExpectContinueTimeout: 1500 * time.Millisecond,
138139
},
139140
}

0 commit comments

Comments
 (0)