fix: Adjusting timeout value to prevent hangs

This commit is contained in:
Gary Holtz 2023-05-30 14:38:50 -05:00
parent 93b82a4999
commit 2d71244efc
No known key found for this signature in database
GPG Key ID: 0C3B92677CFEE92F
1 changed files with 3 additions and 3 deletions

View File

@ -159,12 +159,12 @@ func NewClient(host, token string, allowInsecure bool, isGraphQL bool, isOAuth2
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
Timeout: 5 * time.Second,
KeepAlive: 5 * time.Second,
}).DialContext,
ForceAttemptHTTP2: true,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
IdleConnTimeout: 30 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
TLSClientConfig: tlsConfig(host),