commit 2df6e67526d94a05f4b1d43d172461d37770de73 Author: Damian Johnson atagar@torproject.org Date: Sun Jun 19 14:24:44 2011 -0700
fix: no initial connection resolution if detached
If arm starts up detached then pauses connection resolution until we have a tor instance to get connection results for. Otherwise we fail attempts, hit fallback logic, and quite possibly disable all connection resolution when we do really have an instance. --- src/cli/controller.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/cli/controller.py b/src/cli/controller.py index 1fb52c9..51fbe2b 100644 --- a/src/cli/controller.py +++ b/src/cli/controller.py @@ -482,7 +482,10 @@ def startTorMonitor(startTime): # use the tor pid to help narrow connection results torCmdName = sysTools.getProcessName(torPid, "tor") connections.getResolver(torCmdName, torPid, "tor") - else: connections.getResolver("tor") + else: + # constructs singleton resolver and, if tor isn't connected, initizes + # it to be paused + connections.getResolver("tor").setPaused(not conn.isAlive())
# hack to display a better (arm specific) notice if all resolvers fail connections.RESOLVER_FINAL_FAILURE_MSG += " (connection related portions of the monitor won't function)"
tor-commits@lists.torproject.org