From d06dfc70b0c03c5bfa4a4977e406166cef36ee8b Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 3 Dec 2014 11:50:23 +0000 Subject: [PATCH] Fix bug where did not always resolve all the deferreds in _attempt_new_transaction --- synapse/federation/replication.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py index 312d69fca..01f87fe42 100644 --- a/synapse/federation/replication.py +++ b/synapse/federation/replication.py @@ -853,7 +853,10 @@ class _TransactionQueue(object): # Ensures we don't continue until all callbacks on that # deferred have fired - yield deferred + try: + yield deferred + except: + pass logger.debug("TX [%s] Yielded to callbacks", destination) @@ -865,7 +868,8 @@ class _TransactionQueue(object): logger.exception(e) for deferred in deferreds: - deferred.errback(e) + if not deferred.called: + deferred.errback(e) finally: # We want to be *very* sure we delete this after we stop processing