make sure to release locks upon timeout (#10596)

fixes #10418
This commit is contained in:
Harshavardhana
2020-09-29 15:18:34 -07:00
committed by GitHub
parent fdf0ae9167
commit 1f9abbee4d
8 changed files with 34 additions and 31 deletions

View File

@@ -680,7 +680,7 @@ func newStorageRESTClient(endpoint Endpoint) *storageRESTClient {
}
}
trFn := newInternodeHTTPTransport(tlsConfig, rest.DefaultRESTTimeout)
trFn := newInternodeHTTPTransport(tlsConfig, rest.DefaultTimeout)
restClient := rest.NewClient(serverURL, trFn, newAuthToken)
restClient.HealthCheckFn = func() bool {
ctx, cancel := context.WithTimeout(GlobalContext, restClient.HealthCheckTimeout)