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