You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2014/09/17 16:27:04 UTC

svn commit: r1625610 - /qpid/proton/branches/examples/tutorial/proton_events.py

Author: gsim
Date: Wed Sep 17 14:27:04 2014
New Revision: 1625610

URL: http://svn.apache.org/r1625610
Log:
Ensure connector does not interfere with unrelated timer events

Modified:
    qpid/proton/branches/examples/tutorial/proton_events.py

Modified: qpid/proton/branches/examples/tutorial/proton_events.py
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/tutorial/proton_events.py?rev=1625610&r1=1625609&r2=1625610&view=diff
==============================================================================
--- qpid/proton/branches/examples/tutorial/proton_events.py (original)
+++ qpid/proton/branches/examples/tutorial/proton_events.py Wed Sep 17 14:27:04 2014
@@ -647,10 +647,11 @@ class Connector(EventDispatcher):
                 self._connect(event.connection)
             else:
                 print "Disconnected will try to reconnect after %s seconds" % delay
-                self.loop.schedule(time.time() + delay, connection=event.connection)
+                self.loop.schedule(time.time() + delay, connection=event.connection, subject=self)
 
     def on_timer(self, event):
-        self._connect(event.connection)
+        if event.subject == self and event.connection:
+            self._connect(event.connection)
 
 class Backoff(object):
     def __init__(self):



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org