Set MaxIdleConns and MaxIdleConnsPerHost to 100 and 20 respectively
This commit is contained in:
parent
2066497553
commit
835704bf8a
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user