Skip to content

Commit

Permalink
client: explicit http timeouts in api client
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Aug 7, 2023
1 parent 6c03a5d commit 8d4e4f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ func httpClient(cm apitls.CertificateProvider) (*http.Client, error) {

// tlsConfig.BuildNameToCertificate()
transport := &http.Transport{
TLSClientConfig: tlsConfig,
MaxIdleConns: 10,
IdleConnTimeout: 90 * time.Second,
TLSClientConfig: tlsConfig,
MaxIdleConns: 10,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 5 * time.Second,
ResponseHeaderTimeout: 40 * time.Second,
}
client := &http.Client{
Transport: transport,
Expand Down

0 comments on commit 8d4e4f4

Please sign in to comment.