[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



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

  * status:  new => closed
  * resolution:  => not a bug


Comment:

 The ControlSocket's is_alive() method is very frequently used, both
 internally and by Controllers, to test for socket health. Making this
 perform a query would be disastrous in terms of load. It would also break
 if we weren't yet authenticated.

 The caveat that the is_alive() method places, about knowing when a
 socket's alive or not, is mitigated by the BaseController because it
 continually pulls from the socket and hence *does* know when the socket is
 no longer alive...

 {{{
 This means that to have reliable detection for when we're disconnected
 you need to continually pull from the socket (which is part of what the
 :class:`stem.control.BaseController` does).
 }}}

 https://gitweb.torproject.org/stem.git/blob/HEAD:/stem/socket.py#l142

 Feel free to reopen if you still think that we should proceed with this
 for some reason.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6234#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