mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Exit immediately after SIGTERM is there are no signals running.
Cf. https://bugs.torproject.org/24875
This commit is contained in:
parent
6a9c2bf951
commit
bdc1798adb
2 changed files with 4 additions and 10 deletions
|
@ -241,11 +241,8 @@ func main() {
|
||||||
ln.Close()
|
ln.Close()
|
||||||
}
|
}
|
||||||
snowflakes.End()
|
snowflakes.End()
|
||||||
for n := range handlerChan {
|
for numHandlers > 0 {
|
||||||
numHandlers += n
|
numHandlers += <-handlerChan
|
||||||
if numHandlers == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
log.Println("snowflake is done.")
|
log.Println("snowflake is done.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -393,10 +393,7 @@ func main() {
|
||||||
for _, server := range servers {
|
for _, server := range servers {
|
||||||
server.Close()
|
server.Close()
|
||||||
}
|
}
|
||||||
for n := range handlerChan {
|
for numHandlers > 0 {
|
||||||
numHandlers += n
|
numHandlers += <-handlerChan
|
||||||
if numHandlers == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue