Skip to content

Commit 0865064

Browse files
committed
Handle SIGTERM on windows
1 parent 2539bbb commit 0865064

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/signal_windows.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"fmt"
1818
"os"
1919
"os/signal"
20+
"syscall"
2021
"time"
2122

2223
"golang.org/x/sys/windows/svc"
@@ -30,7 +31,7 @@ func (s *Server) handleSignals() {
3031
}
3132
c := make(chan os.Signal, 1)
3233

33-
signal.Notify(c, os.Interrupt)
34+
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
3435

3536
go func() {
3637
for sig := range c {

0 commit comments

Comments
 (0)