summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-03 16:25:41 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-03 16:29:30 +0000
commit814cc00cb96168479a5c462e9078f3b60901589d (patch)
tree4316758104b592f432743c64ef15f4dd66304d55 /synapse
parentmake FederationHandler.persist_events_and_notify async (diff)
downloadsynapse-814cc00cb96168479a5c462e9078f3b60901589d.tar.xz
make FederationHandler._notify_persisted_event async
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/federation.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index ec010c1f9f..19cd55b8cf 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -2849,13 +2849,15 @@ class FederationHandler(BaseHandler):
                 for event, _ in event_and_contexts:
                     await self._notify_persisted_event(event, max_stream_id)
 
-    def _notify_persisted_event(self, event, max_stream_id):
+    async def _notify_persisted_event(
+        self, event: EventBase, max_stream_id: int
+    ) -> None:
         """Checks to see if notifier/pushers should be notified about the
         event or not.
 
         Args:
-            event (FrozenEvent)
-            max_stream_id (int): The max_stream_id returned by persist_events
+            event:
+            max_stream_id: The max_stream_id returned by persist_events
         """
 
         extra_users = []
@@ -2879,7 +2881,7 @@ class FederationHandler(BaseHandler):
             event, event_stream_id, max_stream_id, extra_users=extra_users
         )
 
-        return self.pusher_pool.on_new_notifications(event_stream_id, max_stream_id)
+        await self.pusher_pool.on_new_notifications(event_stream_id, max_stream_id)
 
     def _clean_room_for_join(self, room_id):
         """Called to clean up any data in DB for a given room, ready for the