diff --git a/cmd/common-main.go b/cmd/common-main.go index b8e369423..125b976a3 100644 --- a/cmd/common-main.go +++ b/cmd/common-main.go @@ -307,7 +307,7 @@ func checkUpdate(mode string) { return } - logStartupMessage(prepareUpdateMessage("Run `mc admin update`", lrTime.Sub(crTime))) + logStartupMessage(prepareUpdateMessage("\nRun `mc admin update`", lrTime.Sub(crTime))) } func newConfigDirFromCtx(ctx *cli.Context, option string, getDefaultDir func() string) (*ConfigDir, bool) { diff --git a/cmd/gateway-main.go b/cmd/gateway-main.go index 84f55cb37..f00ce1fdc 100644 --- a/cmd/gateway-main.go +++ b/cmd/gateway-main.go @@ -335,11 +335,13 @@ func StartGateway(ctx *cli.Context, gw Gateway) { // - compression verifyObjectLayerFeatures("gateway "+gatewayName, newObject) - // Prints the formatted startup message once object layer is initialized. - if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled { - // Check update mode. - checkUpdate(globalMinioModeGatewayPrefix + gatewayName) - } + // Check for updates in non-blocking manner. + go func() { + if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled { + // Check for new updates from dl.min.io. + checkUpdate(getMinioMode()) + } + }() if !globalCLIContext.Quiet { // Print gateway startup message. diff --git a/cmd/server-main.go b/cmd/server-main.go index 2581c9aee..7bd4d2c3c 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -460,10 +460,13 @@ func serverMain(ctx *cli.Context) { } } - if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled { - // Check for new updates from dl.min.io. - checkUpdate(getMinioMode()) - } + // Check for updates in non-blocking manner. + go func() { + if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled { + // Check for new updates from dl.min.io. + checkUpdate(getMinioMode()) + } + }() if !globalActiveCred.IsValid() && globalIsDistErasure { globalActiveCred = auth.DefaultCredentials