Set MaxIdleConns and MaxIdleConnsPerHost to 100 and 20 respectively

This commit is contained in:
TwinProduction 2020-10-30 09:51:42 -04:00
parent 2066497553
commit 835704bf8a

View File

@ -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