diff --git a/cmd/admin-service-restart.go b/cmd/admin-service-restart.go index a2a4b7c8..6adf3f3c 100644 --- a/cmd/admin-service-restart.go +++ b/cmd/admin-service-restart.go @@ -147,8 +147,6 @@ func mainAdminServiceRestart(ctx *cli.Context) error { case <-globalContext.Done(): return globalContext.Err() case <-timer.C: - timer.Reset(time.Second) - ctx, cancel := context.WithTimeout(globalContext, 3*time.Second) // Fetch the service status of the specified MinIO server info, e := client.ServerInfo(ctx) @@ -168,6 +166,8 @@ func mainAdminServiceRestart(ctx *cli.Context) error { default: printProgress() } + + timer.Reset(time.Second) } } } diff --git a/cmd/ready.go b/cmd/ready.go index 5d5de99c..0cf4b158 100644 --- a/cmd/ready.go +++ b/cmd/ready.go @@ -136,7 +136,6 @@ func mainReady(cliCtx *cli.Context) error { case <-ctx.Done(): return nil case <-timer.C: - timer.Reset(healthCheckInterval) healthResult, hErr := anonClient.Healthy(ctx, healthOpts) fatalIf(probe.NewError(hErr).Trace(aliasedURL), "Couldn't get the health status for `"+aliasedURL+"`.") printMsg(readyMessage{ @@ -148,6 +147,8 @@ func mainReady(cliCtx *cli.Context) error { if healthResult.Healthy { return nil } + + timer.Reset(healthCheckInterval) } } }