summary refs log tree commit diff
path: root/synapse/http/client.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-12 16:37:50 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-12 16:37:50 +0100
commitcffe6057fb59a4db622132a84b5ef88cf81f6bfd (patch)
tree173ebcd9a8c7c04ee3a4f733995a47c515e9c81a /synapse/http/client.py
parentMerge branch 'notifier_unify' into notifier_performance (diff)
parentMerge branch 'develop' into notifier_unify (diff)
downloadsynapse-cffe6057fb59a4db622132a84b5ef88cf81f6bfd.tar.xz
Merge branch 'notifier_unify' into notifier_performance
Conflicts:
	synapse/notifier.py
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r--synapse/http/client.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py
index e8a5dedab4..5b3cefb2dc 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 from synapse.api.errors import CodeMessageException
+from synapse.util.logcontext import preserve_context_over_fn
 from syutil.jsonutil import encode_canonical_json
 import synapse.metrics
 
@@ -61,7 +62,10 @@ class SimpleHttpClient(object):
         # A small wrapper around self.agent.request() so we can easily attach
         # counters to it
         outgoing_requests_counter.inc(method)
-        d = self.agent.request(method, *args, **kwargs)
+        d = preserve_context_over_fn(
+            self.agent.request,
+            method, *args, **kwargs
+        )
 
         def _cb(response):
             incoming_responses_counter.inc(method, response.code)