summary refs log tree commit diff
path: root/synapse/federation/federation_server.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-12-31 15:21:37 +0000
committerMatthew Hodgson <matthew@matrix.org>2016-12-31 15:21:37 +0000
commit555d702e3441e355d6b5e23702ab9505728dea71 (patch)
tree81611db6a9d26f43bd22c08127126d88f60b2b41 /synapse/federation/federation_server.py
parentMerge branch 'release-v0.18.6' into develop (diff)
downloadsynapse-555d702e3441e355d6b5e23702ab9505728dea71.tar.xz
limit total timeout for get_missing_events to 10s
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r--synapse/federation/federation_server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index f4c60e67e3..6d76e6f917 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -425,6 +425,7 @@ class FederationServer(FederationBase):
                 " limit: %d, min_depth: %d",
                 earliest_events, latest_events, limit, min_depth
             )
+
             missing_events = yield self.handler.on_get_missing_events(
                 origin, room_id, earliest_events, latest_events, limit, min_depth
             )
@@ -567,6 +568,9 @@ class FederationServer(FederationBase):
                                 len(prevs - seen), pdu.room_id, list(prevs - seen)[:5]
                             )
 
+                            # XXX: we set timeout to 10s to help workaround
+                            # https://github.com/matrix-org/synapse/issues/1733
+
                             missing_events = yield self.get_missing_events(
                                 origin,
                                 pdu.room_id,
@@ -574,6 +578,7 @@ class FederationServer(FederationBase):
                                 latest_events=[pdu],
                                 limit=10,
                                 min_depth=min_depth,
+                                timeout=10000,
                             )
 
                             # We want to sort these by depth so we process them and