Fix bug where did not always resolve all the deferreds in _attempt_new_transaction

pull/22/head
Erik Johnston 2014-12-03 11:50:23 +00:00
parent 66b0596b7a
commit d06dfc70b0
1 changed files with 6 additions and 2 deletions

View File

@ -853,7 +853,10 @@ class _TransactionQueue(object):
# Ensures we don't continue until all callbacks on that # Ensures we don't continue until all callbacks on that
# deferred have fired # deferred have fired
yield deferred try:
yield deferred
except:
pass
logger.debug("TX [%s] Yielded to callbacks", destination) logger.debug("TX [%s] Yielded to callbacks", destination)
@ -865,7 +868,8 @@ class _TransactionQueue(object):
logger.exception(e) logger.exception(e)
for deferred in deferreds: for deferred in deferreds:
deferred.errback(e) if not deferred.called:
deferred.errback(e)
finally: finally:
# We want to be *very* sure we delete this after we stop processing # We want to be *very* sure we delete this after we stop processing