[tor-bugs] #6234 [Stem]: stem.socket.ControlSocket.is_alive() should check if socket is open explicitly

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Jun 25 04:31:00 UTC 2012


#6234: stem.socket.ControlSocket.is_alive() should check if socket is open
explicitly
------------------------+---------------------------------------------------
    Reporter:  gsathya  |       Owner:  atagar           
        Type:  defect   |      Status:  needs_information
    Priority:  normal   |   Milestone:                   
   Component:  Stem     |     Version:                   
  Resolution:           |    Keywords:                   
      Parent:           |      Points:                   
Actualpoints:           |  
------------------------+---------------------------------------------------

Comment(by atagar):

 > The is_alive() method is broken when a controller issues a "QUIT"
 message.

 Hm, that does seem like a bug. I'll look into it a bit tomorrow and add a
 test for it - not sure what's happening there yet.

 The controller's is_alive() method *should* behave the way that you want,
 and it's a bug that it doesn't. We shouldn't need to actively query tor to
 make this work, though.

 > We can use a sample PROTOCOLINFO query to check - it doesn't need auth,
 so it won't close the connection

 Funny thing about PROTOCOLINFO, it *does* disconnect the socket if you
 issue it more than once before authenticating. Personally I think that's
 stupid (and had to hack around it in the connection module), but oh well.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6234#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list