[cmds] Trigger instance shutdown on external events
This commit is contained in:
@@ -123,9 +123,13 @@ waitSignal:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for shutdown to finish.
|
// Trigger shutdown.
|
||||||
|
s.instance.Shutdown()
|
||||||
|
|
||||||
|
// Notify the service host that service is in shutting down state.
|
||||||
changes <- svc.Status{State: svc.StopPending}
|
changes <- svc.Status{State: svc.StopPending}
|
||||||
|
|
||||||
|
// Wait for shutdown to finish.
|
||||||
// Catch signals during shutdown.
|
// Catch signals during shutdown.
|
||||||
// Force exit after 5 interrupts.
|
// Force exit after 5 interrupts.
|
||||||
forceCnt := 5
|
forceCnt := 5
|
||||||
|
|||||||
Reference in New Issue
Block a user