mirror of
https://github.com/TwiN/gatus.git
synced 2025-01-11 16:38:17 +01:00
Merge pull request #23 from TwinProduction/max-idle-conns
Set MaxIdleConns and MaxIdleConnsPerHost to 100 and 20 respectively
This commit is contained in:
commit
3df8fc8c3c
@ -19,6 +19,8 @@ func GetHTTPClient(insecure bool) *http.Client {
|
|||||||
insecureHTTPClient = &http.Client{
|
insecureHTTPClient = &http.Client{
|
||||||
Timeout: time.Second * 10,
|
Timeout: time.Second * 10,
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
|
MaxIdleConns: 100,
|
||||||
|
MaxIdleConnsPerHost: 20,
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
},
|
},
|
||||||
@ -30,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…
Reference in New Issue
Block a user