summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-09 11:12:06 +0100
committerErik Johnston <erik@matrix.org>2016-05-09 11:12:06 +0100
commit34b3af3363a3e41b3ea8992f2386739ce68387a6 (patch)
tree9ecd979e849a8115140a279b57d3bcee75ef2788 /synapse
parentMerge pull request #768 from matrix-org/erikj/queue_evens_persist (diff)
parentRun transaction queue on reactor (diff)
downloadsynapse-34b3af3363a3e41b3ea8992f2386739ce68387a6.tar.xz
Merge pull request #770 from matrix-org/erikj/transaction_reactor
Run transaction queue on reactor
Diffstat (limited to 'synapse')
-rw-r--r--synapse/federation/transaction_queue.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py
index 1928da03b3..5787f854d4 100644
--- a/synapse/federation/transaction_queue.py
+++ b/synapse/federation/transaction_queue.py
@@ -20,6 +20,7 @@ from .persistence import TransactionActions
 from .units import Transaction
 
 from synapse.api.errors import HttpResponseException
+from synapse.util.async import run_on_reactor
 from synapse.util.logutils import log_function
 from synapse.util.logcontext import PreserveLoggingContext
 from synapse.util.retryutils import (
@@ -199,6 +200,8 @@ class TransactionQueue(object):
     @defer.inlineCallbacks
     @log_function
     def _attempt_new_transaction(self, destination):
+        yield run_on_reactor()
+
         # list of (pending_pdu, deferred, order)
         if destination in self.pending_transactions:
             # XXX: pending_transactions can get stuck on by a never-ending