fix: notify systemd as soon as we wait on the OS signal (#17199)

This commit is contained in:
Harshavardhana 2023-05-12 16:42:17 -07:00 committed by GitHub
parent e07c2ab868
commit b62791617c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -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
}