[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
Sun Jun 24 11:56:50 UTC 2012


#6234: stem.socket.ControlSocket.is_alive() should check if socket is open
explicitly
---------------------+------------------------------------------------------
 Reporter:  gsathya  |          Owner:  atagar
     Type:  defect   |         Status:  new   
 Priority:  normal   |      Milestone:        
Component:  Stem     |        Version:        
 Keywords:           |         Parent:        
   Points:           |   Actualpoints:        
---------------------+------------------------------------------------------
 "Checks if the socket is known to be closed. We won't be aware if it is
 until we either use it or have explicitily shut it down." Instead of this
 we should do a sample query and if we get a SocketError, then return a
 False.

 {{{

 def is_alive(self):
   try:
     self.send("GETINFO version")
    except SocketError:
      self._is_alive = False
   return self._is_alive

 }}}

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


More information about the tor-bugs mailing list