Move forceCnt into the goroutine

From PR Review https://github.com/safing/portbase/pull/56
This commit is contained in:
Daniel 2020-07-10 11:48:50 +02:00
parent f4fcd0c67c
commit 5f2c861e2d

View file

@ -74,9 +74,9 @@ signalLoop:
fmt.Println(" <INTERRUPT>")
log.Warning("main: program was interrupted, shutting down.")
forceCnt := 5
// catch signals during shutdown
go func() {
forceCnt := 5
for {
<-signalCh
forceCnt--