Skip to content

Commit a935aa1

Browse files
authored
Merge pull request #5610 from yanfeng1992/fixbug-toomany-conn
cluster proxy transport disable keepalive
2 parents ac589d6 + 122ff3a commit a935aa1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/util/proxy/proxy.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ func constructLocation(cluster *clusterapis.Cluster) (*url.URL, error) {
183183
func createProxyTransport(cluster *clusterapis.Cluster, tlsConfig *tls.Config) (*http.Transport, error) {
184184
var proxyDialerFn utilnet.DialFunc
185185
trans := utilnet.SetTransportDefaults(&http.Transport{
186-
DialContext: proxyDialerFn,
187-
TLSClientConfig: tlsConfig,
186+
DialContext: proxyDialerFn,
187+
TLSClientConfig: tlsConfig,
188+
DisableKeepAlives: true,
188189
})
189190

190191
if proxyURL := cluster.Spec.ProxyURL; proxyURL != "" {

0 commit comments

Comments
 (0)