diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-05 16:08:02 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-05 16:08:02 +0000 |
commit | ae702d161ab6d518caa91759ec6bdec01b11954f (patch) | |
tree | fd70589e10c80af4cdf81a6554b8993868614b68 /synapse/federation/federation_server.py | |
parent | Give LruCache a __len__, so that len(cache) works (diff) | |
download | synapse-ae702d161ab6d518caa91759ec6bdec01b11954f.tar.xz |
Handle if get_missing_pdu returns 400 or not all events.
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r-- | synapse/federation/federation_server.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 4264d857be..dd4ca74ba6 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -413,12 +413,14 @@ class FederationServer(FederationBase): missing_events = yield self.get_missing_events( origin, pdu.room_id, - earliest_events=list(latest), - latest_events=[pdu.event_id], + earliest_events_ids=list(latest), + latest_events=[pdu], limit=10, min_depth=min_depth, ) + missing_events.sort(key=lambda x: x.depth) + for e in missing_events: yield self._handle_new_pdu( origin, |