summary refs log tree commit diff
path: root/synapse/handlers/appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-08-24 13:52:41 +0100
committerGitHub <noreply@github.com>2016-08-24 13:52:41 +0100
commitd89f8683dc873c97fc8e046b2eec200a9be0230c (patch)
tree19e005a8ff177a3d0d6ee6eae0ea5c03e775a047 /synapse/handlers/appservice.py
parentMerge pull request #1040 from matrix-org/erikj/pagination (diff)
parentRemove tracer (diff)
downloadsynapse-d89f8683dc873c97fc8e046b2eec200a9be0230c.tar.xz
Merge pull request #1042 from matrix-org/erikj/preserve_log_contexts
Preserve some logcontexts
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r--synapse/handlers/appservice.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index dd285452cd..306686a384 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -17,7 +17,7 @@ from twisted.internet import defer
 
 from synapse.api.constants import EventTypes
 from synapse.util.metrics import Measure
-from synapse.util.logcontext import preserve_fn
+from synapse.util.logcontext import preserve_fn, preserve_context_over_deferred
 
 import logging
 
@@ -163,10 +163,10 @@ class ApplicationServicesHandler(object):
     def query_3pe(self, kind, protocol, fields):
         services = yield self._get_services_for_3pn(protocol)
 
-        results = yield defer.DeferredList([
-            self.appservice_api.query_3pe(service, kind, protocol, fields)
+        results = yield preserve_context_over_deferred(defer.DeferredList([
+            preserve_fn(self.appservice_api.query_3pe)(service, kind, protocol, fields)
             for service in services
-        ], consumeErrors=True)
+        ], consumeErrors=True))
 
         ret = []
         for (success, result) in results: