summary refs log tree commit diff
path: root/synapse/handlers/events.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-11-19 16:37:43 +0000
committerMark Haines <mark.haines@matrix.org>2014-11-19 16:37:43 +0000
commit97c7c34f6f71238dcb364374733c1f2200d6b982 (patch)
tree944a2d841a5eae9fac1baff9fc5e0c504a3f7cb0 /synapse/handlers/events.py
parentSYN-141: Encode query params as UTF-8. (diff)
downloadsynapse-97c7c34f6f71238dcb364374733c1f2200d6b982.tar.xz
Preserve logging context in a few more places, drop the logging context after it has been stashed to reduce potential for confusion
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r--synapse/handlers/events.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 93dcd40324..4993c92b74 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -15,6 +15,7 @@
 
 from twisted.internet import defer
 
+from synapse.util.logcontext import PreserveLoggingContext
 from synapse.util.logutils import log_function
 
 from ._base import BaseHandler
@@ -66,9 +67,10 @@ class EventStreamHandler(BaseHandler):
             rm_handler = self.hs.get_handlers().room_member_handler
             room_ids = yield rm_handler.get_rooms_for_user(auth_user)
 
-            events, tokens = yield self.notifier.get_events_for(
-                auth_user, room_ids, pagin_config, timeout
-            )
+            with PreserveLoggingContext():
+                events, tokens = yield self.notifier.get_events_for(
+                    auth_user, room_ids, pagin_config, timeout
+                )
 
             chunks = [self.hs.serialize_event(e) for e in events]