diff --git a/cmds/cmdbase/service_windows.go b/cmds/cmdbase/service_windows.go index fdb6df74..26468a69 100644 --- a/cmds/cmdbase/service_windows.go +++ b/cmds/cmdbase/service_windows.go @@ -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} + // Wait for shutdown to finish. // Catch signals during shutdown. // Force exit after 5 interrupts. forceCnt := 5