[tor-dev] Stem code review 2012-12-10
atagar at torproject.org
Sat Dec 15 06:17:06 UTC 2012
Hi Sean, thanks for the code review!
> As to re-attaching event listeners, I agree that putting a specialized
> hook into BaseController.msg seems bad. I have an alternate idea that
> puts the re-attachment in an authenticate method. I am not proposing this
> as the solution, but I hope this sparks the idea for another way to handle
I'd like to find a better option, but the trouble is that there's
multiple methods for authenticating to a Controller. In particular
there's three that come to mind...
1. Using the Controller's authenticate() method.
2. Using stem.connection's authenticate() function.
3. Using the BaseController's msg() function to send an 'AUTHENTICATE' request.
Your suggestion of moving the hook to Controller.authenticate() just
covers the first. Mine covers all three but feels a bit icky.
Suggestions welcome! -Damian
More information about the tor-dev