Handle SIGTERM on windows

This commit is contained in:
Waldemar Quevedo
2021-09-01 13:25:14 -07:00
parent 918aff0378
commit 75543e3e49

View File

@@ -17,6 +17,7 @@ import (
"fmt"
"os"
"os/signal"
"syscall"
"time"
"golang.org/x/sys/windows/svc"
@@ -30,7 +31,7 @@ func (s *Server) handleSignals() {
}
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
for sig := range c {