diff --git a/client/client.go b/client/client.go index 1dad7832..cb8df091 100644 --- a/client/client.go +++ b/client/client.go @@ -19,6 +19,8 @@ func GetHTTPClient(insecure bool) *http.Client { insecureHTTPClient = &http.Client{ Timeout: time.Second * 10, Transport: &http.Transport{ + MaxIdleConns: 100, + MaxIdleConnsPerHost: 20, TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, @@ -30,6 +32,10 @@ func GetHTTPClient(insecure bool) *http.Client { if secureHTTPClient == nil { secureHTTPClient = &http.Client{ Timeout: time.Second * 10, + Transport: &http.Transport{ + MaxIdleConns: 100, + MaxIdleConnsPerHost: 20, + }, } } return secureHTTPClient