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 15:31:26 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-12 15:31:26 +0100
commit4429e4bf2499b0b3fecc8637c2a7a932aab908e4 (patch)
tree0c17e1767434df9684c3d34263a161ba4fa1d9b9 /synapse/http/client.py
parentUpdate the end_token correctly, otherwise the token doesn't advance and the c... (diff)
parentMerge pull request #143 from matrix-org/erikj/SYN-375 (diff)
downloadsynapse-4429e4bf2499b0b3fecc8637c2a7a932aab908e4.tar.xz
Merge branch 'develop' into notifier_unify
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)