[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[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: 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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs