summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-07-24 00:37:17 +0100
committerRichard van der Hoff <richard@matrix.org>2018-07-24 00:37:17 +0100
commit8dff6e0322718ec9c446465c1e10ab331a417b8a (patch)
tree65a9cce97966f34bf1423d5f53c2512ac70a13d4 /synapse/handlers
parentMerge pull request #3584 from matrix-org/erikj/use_cached (diff)
downloadsynapse-8dff6e0322718ec9c446465c1e10ab331a417b8a.tar.xz
Logcontext fixes
Fix some random logcontext leaks.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/initial_sync.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py
index fb11716eb8..50b13d8820 100644
--- a/synapse/handlers/initial_sync.py
+++ b/synapse/handlers/initial_sync.py
@@ -387,19 +387,21 @@ class InitialSyncHandler(BaseHandler):
                 receipts = []
             defer.returnValue(receipts)
 
-        presence, receipts, (messages, token) = yield defer.gatherResults(
-            [
-                run_in_background(get_presence),
-                run_in_background(get_receipts),
-                run_in_background(
-                    self.store.get_recent_events_for_room,
-                    room_id,
-                    limit=limit,
-                    end_token=now_token.room_key,
-                )
-            ],
-            consumeErrors=True,
-        ).addErrback(unwrapFirstError)
+        presence, receipts, (messages, token) = yield make_deferred_yieldable(
+            defer.gatherResults(
+                [
+                    run_in_background(get_presence),
+                    run_in_background(get_receipts),
+                    run_in_background(
+                        self.store.get_recent_events_for_room,
+                        room_id,
+                        limit=limit,
+                        end_token=now_token.room_key,
+                    )
+                ],
+                consumeErrors=True,
+            ).addErrback(unwrapFirstError),
+        )
 
         messages = yield filter_events_for_client(
             self.store, user_id, messages, is_peeking=is_peeking,