[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #15125 [Obfuscation/meek]: meek-client-torbrowser does not use signals well
#15125: meek-client-torbrowser does not use signals well
------------------------------+------------------------------
Reporter: infinity0 | Owner: dcf
Type: defect | Status: needs_review
Priority: Medium | Milestone:
Component: Obfuscation/meek | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: cohosh | Sponsor:
------------------------------+------------------------------
Comment (by cohosh):
Looks good!
Is there a reason to have four separate if statements here
{{{
if firefoxCmd != nil {
wg.Add(1)
}
if meekClientCmd != nil {
wg.Add(1)
}
if firefoxCmd != nil {
go func() {
err := terminateCmd(firefoxCmd)
// We terminate Firefox with SIGTERM, so don't log
an
// error if the exit status is "terminated by
SIGTERM."
...
wg.Done()
}()
}
if meekClientCmd != nil {
go func() {
...
}
wg.Wait()
}}}
instead of doing
{{{
if firefoxCmd != nil {
wg.Add(1)
go func() {
err := terminateCmd(firefoxCmd)
// We terminate Firefox with SIGTERM, so don't log
an
// error if the exit status is "terminated by
SIGTERM."
...
wg.Done()
}()
}
if meekClientCmd != nil {
wg.Add(1)
go func() {
...
}
wg.Wait()
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15125#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs