|
|
|
@ -367,9 +367,9 @@ func (sys *BucketTargetSys) getRemoteTargetClient(tcfg *madmin.BucketTarget) (*T |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
hcDuration := tcfg.HealthCheckDuration |
|
|
|
|
if hcDuration < 1 { // require minimum health check duration of 1 sec.
|
|
|
|
|
hcDuration = defaultHealthCheckDuration |
|
|
|
|
hcDuration := defaultHealthCheckDuration |
|
|
|
|
if tcfg.HealthCheckDuration >= 1 { // require minimum health check duration of 1 sec.
|
|
|
|
|
hcDuration = tcfg.HealthCheckDuration |
|
|
|
|
} |
|
|
|
|
tc := &TargetClient{ |
|
|
|
|
Client: api, |
|
|
|
@ -461,10 +461,10 @@ func (tc *TargetClient) healthCheck() { |
|
|
|
|
_, err := tc.BucketExists(GlobalContext, tc.bucket) |
|
|
|
|
if err != nil { |
|
|
|
|
atomic.StoreInt32(&tc.up, 0) |
|
|
|
|
time.Sleep(tc.healthCheckDuration) |
|
|
|
|
time.Sleep(tc.healthCheckDuration * time.Second) |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
atomic.StoreInt32(&tc.up, 1) |
|
|
|
|
time.Sleep(tc.healthCheckDuration) |
|
|
|
|
time.Sleep(tc.healthCheckDuration * time.Second) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|