Set MaxIdleConns and MaxIdleConnsPerHost to 100 and 20 respectively
This commit is contained in:
1 parent
2066497553
commit
835704bf8a
1 file changed
+4
@@ -32,6 +32,10 @@ func GetHTTPClient(insecure bool) *http.Client {
|
|||||||
if secureHTTPClient == nil {
|
if secureHTTPClient == nil {
|
||||||
secureHTTPClient = &http.Client{
|
secureHTTPClient = &http.Client{
|
||||||
Timeout: time.Second * 10,
|
Timeout: time.Second * 10,
|
||||||
|
Transport: &http.Transport{
|
||||||
|
MaxIdleConns: 100,
|
||||||
|
MaxIdleConnsPerHost: 20,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return secureHTTPClient
|
return secureHTTPClient
|
||||||
|
|||||||
Reference in new issue
Block a user