[tor-commits] [arm/master] fix: Blind mode was querying connections

atagar at torproject.org atagar at torproject.org
Wed Apr 27 17:01:53 UTC 2011


commit d47b394d5ddab73d0bc0551daecae4c054d6a9b9
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Apr 27 09:21:05 2011 -0700

    fix: Blind mode was querying connections
    
    Initializing the connection panel was inadvertently spawning connection
    resolution, despite not being visible. Making the panel's update a no-op when
    there's no pre-instantiated resolver.
---
 src/cli/connections/connPanel.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/cli/connections/connPanel.py b/src/cli/connections/connPanel.py
index 569f57c..8339f88 100644
--- a/src/cli/connections/connPanel.py
+++ b/src/cli/connections/connPanel.py
@@ -251,9 +251,13 @@ class ConnectionPanel(panel.Panel, threading.Thread):
     Fetches the newest resolved connections.
     """
     
+    self.appResolveSinceUpdate = False
+    
+    # if we don't have an initialized resolver then this is a no-op
+    if not connections.isResolverAlive("tor"): return
+    
     connResolver = connections.getResolver("tor")
     currentResolutionCount = connResolver.getResolutionCount()
-    self.appResolveSinceUpdate = False
     
     if self._lastResourceFetch != currentResolutionCount:
       self.valsLock.acquire()





More information about the tor-commits mailing list