[tor-bugs] #26389 [Obfuscation/meek]: meek-client keep roundTripRetries on shutdown

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Jun 16 08:48:12 UTC 2018


#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


More information about the tor-bugs mailing list