[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
Wed Jun 27 13:42:33 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: |
------------------------+---------------------------------------------------
Changes (by neena):
* cc: neenaoffline@… (added)
Comment:
> self.assertRaises(stem.socket.SocketClosed,
controller.protocolinfo)
controller.protocolinfo never raises SocketClosed, because "If the socket
is already closed then it is first reconnected".
> self.assertEqual(controller._socket.is_alive(), False)
Strange race condition, adding a time.sleep(1) before the assertion makes
it pass. Not sure why this is happening. This looks like a bug in how
is_alive() works.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6234#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list