fix: limit HTTP transport tuables to affordable values (#9383)

Close connections pro-actively in transient calls
This commit is contained in:
Klaus Post authored and GitHub committed 2020-04-17 11:20:56 -07:00
1 parent d92db198d1
commit c4464e36c8
11 files changed
+40 -28

No files matched your search

+2 -2
View File
@@ -201,12 +201,12 @@ func IsServerResolvable(endpoint Endpoint) error {
}
httpClient := &http.Client{
Transport: newCustomHTTPTransport(tlsConfig, rest.DefaultRESTTimeout, rest.DefaultRESTTimeout)(),
Transport: newCustomHTTPTransport(tlsConfig, rest.DefaultRESTTimeout)(),
}
defer httpClient.CloseIdleConnections()
resp, err := httpClient.Do(req)
if err != nil {
httpClient.CloseIdleConnections()
return err
}
defer xhttp.DrainBody(resp.Body)