summary refs log tree commit diff
path: root/synapse/federation/transport/client.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2017-01-05 12:02:23 +0000
committerGitHub <noreply@github.com>2017-01-05 12:02:23 +0000
commite1c5463efc43f1bba45216cc47e88c28f09fe1be (patch)
tree24230206fed49711294cb8a190525ac4c0818003 /synapse/federation/transport/client.py
parentMerge pull request #1764 from matrix-org/markjh/fix_send_pdu (diff)
parentfix comment (diff)
downloadsynapse-e1c5463efc43f1bba45216cc47e88c28f09fe1be.tar.xz
Merge pull request #1765 from matrix-org/markjh/timeout_get_missing_events
cherrypick #1744: limit total timeout for get_missing_events to 10s
Diffstat (limited to 'synapse/federation/transport/client.py')
-rw-r--r--synapse/federation/transport/client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py
index 491cdc29e1..915af34409 100644
--- a/synapse/federation/transport/client.py
+++ b/synapse/federation/transport/client.py
@@ -386,7 +386,7 @@ class TransportLayerClient(object):
     @defer.inlineCallbacks
     @log_function
     def get_missing_events(self, destination, room_id, earliest_events,
-                           latest_events, limit, min_depth):
+                           latest_events, limit, min_depth, timeout):
         path = PREFIX + "/get_missing_events/%s" % (room_id,)
 
         content = yield self.client.post_json(
@@ -397,7 +397,8 @@ class TransportLayerClient(object):
                 "min_depth": int(min_depth),
                 "earliest_events": earliest_events,
                 "latest_events": latest_events,
-            }
+            },
+            timeout=timeout,
         )
 
         defer.returnValue(content)