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

[or-cvs] r11113: It is necessary to set the EventHandler to the connection be (torflow/trunk/TorCtl)



Author: renner
Date: 2007-08-15 04:54:40 -0400 (Wed, 15 Aug 2007)
New Revision: 11113

Modified:
   torflow/trunk/TorCtl/PathSupport.py
Log:
It is necessary to set the EventHandler to the connection before building any
circuits, otherwise the first circ events might be lost.


Modified: torflow/trunk/TorCtl/PathSupport.py
===================================================================
--- torflow/trunk/TorCtl/PathSupport.py	2007-08-14 21:09:30 UTC (rev 11112)
+++ torflow/trunk/TorCtl/PathSupport.py	2007-08-15 08:54:40 UTC (rev 11113)
@@ -989,6 +989,9 @@
   """ CircuitHandler that extends from PathBuilder """
   def __init__(self, c, selmgr, num_circuits, RouterClass):
     PathBuilder.__init__(self, c, selmgr, RouterClass)
+    # Set handler to the connection here to 
+    # not miss any circuit events on startup
+    c.set_event_handler(self)
     self.num_circuits = num_circuits    # Size of the circuit pool
     self.check_circuit_pool()	        # Bring up the pool of circs