[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_review
Priority: normal | Milestone:
Component: Stem | Version:
Resolution: | Keywords:
Parent: | Points:
Actualpoints: |
------------------------+---------------------------------------------------
Changes (by gsathya):
* status: needs_revision => needs_review
Comment:
Replying to [comment:16 atagar]:
https://gitweb.torproject.org/user/gsathya/stem.git/commitdiff/cf31ed66aa7cc2eb6fac833f44b7f0c6f00e059b?hp=1e2bdc4b8f2c841a41b7b73c5b4fe9c9926deedd
> We should check the QUIT's reply. You'll want to use Ravi's SingleLine
response parser...
Done
> Lets test with both an authenticated an unauthenticated controller.
Amusingly this test would also work if you called
'controller.msg("GOBBDLYGOOK")' followed by a sleep since unauthenticated
sockets will disconnect us anyway.
Won't work. It'll just create a new socket and execute the command - it
won't fail. I'm happy with just socket.is_alive() returning False.
> Also, please use get_socket() rather than accessing the _socket member
directly
Done. Although, this reminds me of Java. Accessor functions in python?
> Slightly weird idea, but instead of adding a quit() method what about
adding a best-effort msg("QUIT") call to our close() method instead?
I like it. Done.
PS - I think I messed up this git branch, you might have to do some
rebasing or some other git foo. Sorry
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6234#comment:17>
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