mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
fix: notify systemd as soon as we wait on the OS signal (#17199)
This commit is contained in:
@@ -664,10 +664,7 @@ func serverMain(ctx *cli.Context) {
|
||||
setConsoleSrv(srv)
|
||||
|
||||
go func() {
|
||||
server := newConsoleServerFn()
|
||||
logger.FatalIf(server.Listen(), "Unable to initialize console server's sockets")
|
||||
daemon.SdNotify(false, daemon.SdNotifyReady)
|
||||
logger.FatalIf(server.Serve(), "Unable to initialize console server")
|
||||
logger.FatalIf(newConsoleServerFn().Serve(), "Unable to initialize console server")
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -790,6 +787,8 @@ func serverMain(ctx *cli.Context) {
|
||||
logger.Info("======")
|
||||
}
|
||||
|
||||
daemon.SdNotify(false, daemon.SdNotifyReady)
|
||||
|
||||
<-globalOSSignalCh
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user