Skip to content

Commit c6ca7d4

Browse files
committed
Revert "daemon/command: don't make notifyReady(), notifyStopping() asynchronous"
This reverts commit 236fc46. Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 5bdfdc0 commit c6ca7d4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

daemon/command/daemon.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ func (cli *daemonCLI) start(ctx context.Context) (err error) {
346346
cli.setupConfigReloadTrap()
347347

348348
// after the daemon is done setting up we can notify systemd api
349-
go notifyReady()
349+
notifyReady()
350350
log.G(ctx).Info("Daemon has completed initialization")
351351

352352
// Daemon is fully initialized. Start handling API traffic
@@ -379,7 +379,7 @@ func (cli *daemonCLI) start(ctx context.Context) (err error) {
379379
c.Cleanup()
380380

381381
// notify systemd that we're shutting down
382-
go notifyStopping()
382+
notifyStopping()
383383
shutdownDaemon(ctx, d)
384384

385385
// shutdown / close BuildKit backend

daemon/command/daemon_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ func preNotifyReady() error {
5050
// notifyReady sends a message to the host when the server is ready to be used
5151
func notifyReady() {
5252
// Tell the init daemon we are accepting requests
53-
_, _ = systemdDaemon.SdNotify(false, systemdDaemon.SdNotifyReady)
53+
go systemdDaemon.SdNotify(false, systemdDaemon.SdNotifyReady)
5454
}
5555

5656
// notifyStopping sends a message to the host when the server is shutting down
5757
func notifyStopping() {
58-
_, _ = systemdDaemon.SdNotify(false, systemdDaemon.SdNotifyStopping)
58+
go systemdDaemon.SdNotify(false, systemdDaemon.SdNotifyStopping)
5959
}
6060

6161
func validateCPURealtimeOptions(cfg *config.Config) error {

0 commit comments

Comments
 (0)