fix: reduce healthcheck interval for storage rest client (#10544)

master
Harshavardhana 4 years ago committed by GitHub
parent 5726cef3ca
commit 81caf35926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/storage-rest-client.go

@ -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…
Cancel
Save