Skip to content

Commit 8981f0d

Browse files
committed
add stop in SCM as well
1 parent 3954a04 commit 8981f0d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Service/system-service_windows.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,9 @@ loop:
402402
changes <- c.CurrentStatus
403403

404404
case svc.Stop, svc.Shutdown:
405+
if thisRef.command.OnStopDelegate != nil {
406+
go thisRef.command.OnStopDelegate()
407+
}
405408

406409
// golang.org/x/sys/windows/svc.TestExample is verifying this output.
407410
testOutput := strings.Join(args, "-")

0 commit comments

Comments
 (0)