summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-11-20 17:49:48 +0000
committerDavid Baker <dbkr@matrix.org>2014-11-20 17:49:48 +0000
commitf1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae (patch)
treeb1ebd402c0805f475500c9f36a0356322bf26f13 /synapse/notifier.py
parentSeparate out the matrix http client completely because just about all of its ... (diff)
parentFix pep8 codestyle warnings (diff)
downloadsynapse-f1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae.tar.xz
Merge branch 'develop' into http_client_refactor
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index c310a9fed6..5e14950449 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -17,6 +17,7 @@ from twisted.internet import defer
 
 from synapse.util.logutils import log_function
 from synapse.util.logcontext import PreserveLoggingContext
+from synapse.util.async import run_on_reactor
 
 import logging
 
@@ -96,6 +97,7 @@ class Notifier(object):
         listening to the room, and any listeners for the users in the
         `extra_users` param.
         """
+        yield run_on_reactor()
         room_id = event.room_id
 
         room_source = self.event_sources.sources["room"]
@@ -143,6 +145,7 @@ class Notifier(object):
 
         Will wake up all listeners for the given users and rooms.
         """
+        yield run_on_reactor()
         presence_source = self.event_sources.sources["presence"]
 
         listeners = set()
@@ -211,6 +214,7 @@ class Notifier(object):
             timeout,
             deferred,
         )
+
         def _timeout_listener():
             # TODO (erikj): We should probably set to_token to the current
             # max rather than reusing from_token.