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: [email protected]
For additional commands, e-mail: [email protected]