You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2013/12/10 23:31:50 UTC
svn commit: r1549988 - in
/qpid/dispatch/trunk/python/qpid_dispatch_internal/router: data.py link.py
Author: tross
Date: Tue Dec 10 22:31:50 2013
New Revision: 1549988
URL: http://svn.apache.org/r1549988
Log:
NO-JIRA - Prevent the router from repeatedly expiring remote link-state.
Modified:
qpid/dispatch/trunk/python/qpid_dispatch_internal/router/data.py
qpid/dispatch/trunk/python/qpid_dispatch_internal/router/link.py
Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/router/data.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/router/data.py?rev=1549988&r1=1549987&r2=1549988&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/router/data.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/router/data.py Tue Dec 10 22:31:50 2013
@@ -90,6 +90,9 @@ class LinkState(object):
def del_all_peers(self):
self.peers = []
+ def has_peers(self):
+ return len(self.peers) > 0
+
def bump_sequence(self):
self.ls_seq += 1
Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/router/link.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/router/link.py?rev=1549988&r1=1549987&r2=1549988&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/router/link.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/router/link.py Tue Dec 10 22:31:50 2013
@@ -121,7 +121,7 @@ class LinkStateEngine(object):
def _expire_ls(self, now):
for key, ls in self.collection.items():
- if key != self.id and now - ls.last_seen > self.remote_ls_max_age:
+ if key != self.id and ls.has_peers() and now - ls.last_seen > self.remote_ls_max_age:
ls.del_all_peers()
self.collection_changed = True
self.container.log(LOG_INFO, "Expired link-state from router: %s" % key)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org