Exit immediately after SIGTERM is there are no signals running.

Cf. https://bugs.torproject.org/24875
This commit is contained in:
David Fifield 2018-03-21 00:51:04 -07:00
parent 6a9c2bf951
commit bdc1798adb
2 changed files with 4 additions and 10 deletions

View file

@ -241,11 +241,8 @@ func main() {
ln.Close()
}
snowflakes.End()
for n := range handlerChan {
numHandlers += n
if numHandlers == 0 {
break
}
for numHandlers > 0 {
numHandlers += <-handlerChan
}
log.Println("snowflake is done.")
}