summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-15 15:05:57 +0100
committerErik Johnston <erik@matrix.org>2015-04-15 15:05:57 +0100
commitd5ff9effcf59b55009eb8226d5f1bbac5a95bdff (patch)
treec9a1dc72dbd0de767ea0211c4f8a85007caa2084
parentRemove run_on_reactor()s (diff)
downloadsynapse-d5ff9effcf59b55009eb8226d5f1bbac5a95bdff.tar.xz
Don't wait on federation_handler.handle_new_event
-rw-r--r--synapse/handlers/_base.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index d0c027de3a..e4471dd9b6 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -139,7 +139,9 @@ class BaseHandler(object):
                 )
 
         # Don't block waiting on waking up all the listeners.
-        d = self.notifier.on_new_room_event(event, extra_users=extra_users)
+        notify_d = self.notifier.on_new_room_event(
+            event, extra_users=extra_users
+        )
 
         def log_failure(f):
             logger.warn(
@@ -147,8 +149,10 @@ class BaseHandler(object):
                 event.event_id, f.value
             )
 
-        d.addErrback(log_failure)
+        notify_d.addErrback(log_failure)
 
-        yield federation_handler.handle_new_event(
+        fed_d = federation_handler.handle_new_event(
             event, destinations=destinations,
         )
+
+        fed_d.addErrback(log_failure)