mirror of
https://github.com/minio/minio.git
synced 2025-03-31 17:53:43 -04:00
fix: reduce healthcheck interval for storage rest client (#10544)
This commit is contained in:
parent
5726cef3ca
commit
81caf35926
@ -29,7 +29,6 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/minio/minio/cmd/http"
|
"github.com/minio/minio/cmd/http"
|
||||||
xhttp "github.com/minio/minio/cmd/http"
|
xhttp "github.com/minio/minio/cmd/http"
|
||||||
@ -669,7 +668,6 @@ func newStorageRESTClient(endpoint Endpoint) *storageRESTClient {
|
|||||||
|
|
||||||
trFn := newInternodeHTTPTransport(tlsConfig, rest.DefaultRESTTimeout)
|
trFn := newInternodeHTTPTransport(tlsConfig, rest.DefaultRESTTimeout)
|
||||||
restClient := rest.NewClient(serverURL, trFn, newAuthToken)
|
restClient := rest.NewClient(serverURL, trFn, newAuthToken)
|
||||||
restClient.HealthCheckInterval = 500 * time.Millisecond
|
|
||||||
restClient.HealthCheckFn = func() bool {
|
restClient.HealthCheckFn = func() bool {
|
||||||
ctx, cancel := context.WithTimeout(GlobalContext, restClient.HealthCheckTimeout)
|
ctx, cancel := context.WithTimeout(GlobalContext, restClient.HealthCheckTimeout)
|
||||||
// Instantiate a new rest client for healthcheck
|
// Instantiate a new rest client for healthcheck
|
||||||
|
Loading…
x
Reference in New Issue
Block a user