summary refs log tree commit diff
path: root/synapse/handlers/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-04 10:22:44 +0000
committerErik Johnston <erik@matrix.org>2016-02-08 14:26:45 +0000
commit2c1fbea5319db2c64fa486adb32b5e66680b6daf (patch)
treef34fb636206664ffa531e30d703469ff1a6d3a19 /synapse/handlers/events.py
parentAdd metrics to pushers (diff)
downloadsynapse-2c1fbea5319db2c64fa486adb32b5e66680b6daf.tar.xz
Fix up logcontexts
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r--synapse/handlers/events.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 5ad8f3779a..4933c31c19 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -18,6 +18,7 @@ from twisted.internet import defer
 from synapse.util.logutils import log_function
 from synapse.types import UserID
 from synapse.events.utils import serialize_event
+from synapse.util.logcontext import preserve_context_over_fn
 
 from ._base import BaseHandler
 
@@ -29,11 +30,17 @@ logger = logging.getLogger(__name__)
 
 
 def started_user_eventstream(distributor, user):
-    return distributor.fire("started_user_eventstream", user)
+    return preserve_context_over_fn(
+        distributor.fire,
+        "started_user_eventstream", user
+    )
 
 
 def stopped_user_eventstream(distributor, user):
-    return distributor.fire("stopped_user_eventstream", user)
+    return preserve_context_over_fn(
+        distributor.fire,
+        "stopped_user_eventstream", user
+    )
 
 
 class EventStreamHandler(BaseHandler):