From 206649755334f6252de3e5a8fe8374a8e21d47a1 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Fri, 30 Oct 2020 09:50:40 -0400 Subject: [PATCH 1/2] Set MaxIdleConns and MaxIdleConnsPerHost to 100 and 20 respectively --- client/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/client.go b/client/client.go index 1dad7832..8daaa246 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, }, From 835704bf8a7dbe6888d4ba7fdeb5b825ea5bc326 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Fri, 30 Oct 2020 09:51:42 -0400 Subject: [PATCH 2/2] Set MaxIdleConns and MaxIdleConnsPerHost to 100 and 20 respectively --- client/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/client.go b/client/client.go index 8daaa246..cb8df091 100644 --- a/client/client.go +++ b/client/client.go @@ -32,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