diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-15 16:40:44 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-15 16:40:44 +0100 |
commit | 59516a8bb1cd8040bd07420f84b856bd8904d6c8 (patch) | |
tree | dead9dbd62ec1bf03688697c45df0fbbff51f51a /synapse/handlers/federation.py | |
parent | Improve logging in federation handler. (diff) | |
download | synapse-59516a8bb1cd8040bd07420f84b856bd8904d6c8.tar.xz |
Correctly handle receiving 'missing' Pdus from federation, rather than just discarding them.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 5187bcb5bb..001c6c110c 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -100,17 +100,11 @@ class FederationHandler(BaseHandler): is_new_state = yield self.state_handler.handle_new_state( pdu ) - if not is_new_state: - return else: is_new_state = False # TODO: Implement something in federation that allows us to # respond to PDU. - if hasattr(event, "state_key") and not is_new_state: - logger.debug("Ignoring old state: %s", event.event_id) - return - target_is_mine = False if hasattr(event, "target_host"): target_is_mine = event.target_host == self.hs.hostname @@ -141,7 +135,11 @@ class FederationHandler(BaseHandler): else: with (yield self.room_lock.lock(event.room_id)): - yield self.store.persist_event(event, backfilled) + yield self.store.persist_event( + event, + backfilled, + is_new_state=is_new_state + ) room = yield self.store.get_room(event.room_id) |