[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #26389 [Obfuscation/meek]: meek-client keep roundTripRetries on shutdown
#26389: meek-client keep roundTripRetries on shutdown
------------------------------+---------------------
Reporter: cypherpunks | Owner: dcf
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Obfuscation/meek | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
------------------------------+---------------------
Comment (by cypherpunks):
After [https://gitweb.torproject.org/pluggable-transports/meek.git/commit
/meek-client/meek-client.go?id=0ec986eb2b4bc23d81e6e8beffd382890f55bfb1
Update client shutdown procedure] commit meek-client keep running
`roundTripRetries` after shutdown signal.
Reason it work before:
{{{
- if sig == syscall.SIGTERM {
- log.Printf("done")
- return
- }
}}}
Solution. To replace:
{{{
time.Sleep(retryDelay)
}}}
By something like this:
{{{
select {
case <-shutdownChan:
return resp, err
case <-time.After(retryDelay):
break
}
}}}
Then to inform it on exit, by something like this:
{{{
shutdownChan <- true
for _, ln := range listeners {
ln.Close()
}
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26389#comment:1>
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