[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/master] Don't set our controller to None when disconnected



commit ded14d732c8875e8c2ab09e74f47db41a1d5d51a
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Jun 1 19:31:07 2013 -0700

    Don't set our controller to None when disconnected
    
    Several of our changes expect us to have a controller attribute, so setting it
    to None causes a stacktrace when tor is shut down. Actually, stem provides us
    with graceful re-attachability so there's no reason to get rid of our
    Controller instance so simply leaving it alone.
---
 src/util/torTools.py |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/util/torTools.py b/src/util/torTools.py
index 1ed1bbb..adc4d93 100644
--- a/src/util/torTools.py
+++ b/src/util/torTools.py
@@ -132,9 +132,7 @@ class Controller:
     self.connLock.acquire()
     if self.controller:
       self.controller.close()
-      self.controller = None
-      self.connLock.release()
-    else: self.connLock.release()
+    self.connLock.release()
   
   def getController(self):
     return self.controller



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits