Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Anti-censorship
Pluggable Transports
Snowflake
Commits
bdc1798a
Commit
bdc1798a
authored
Mar 21, 2018
by
David Fifield
Browse files
Exit immediately after SIGTERM is there are no signals running.
Cf.
https://bugs.torproject.org/24875
parent
6a9c2bf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/snowflake.go
View file @
bdc1798a
...
...
@@ -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."
)
}
server/server.go
View file @
bdc1798a
...
...
@@ -393,10 +393,7 @@ func main() {
for
_
,
server
:=
range
servers
{
server
.
Close
()
}
for
n
:=
range
handlerChan
{
numHandlers
+=
n
if
numHandlers
==
0
{
break
}
for
numHandlers
>
0
{
numHandlers
+=
<-
handlerChan
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment