diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-03-20 11:21:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 11:21:01 +0000 |
commit | 2e05f5d7a4d713be3ba950672c26e6d5e3ab031f (patch) | |
tree | 9beddc25115cb9931933727b1ea6d7205999ce72 /synapse/storage/state.py | |
parent | Merge pull request #2016 from matrix-org/rav/queue_pdus_during_join (diff) | |
parent | Avoid resetting state on rejected events (diff) | |
download | synapse-2e05f5d7a4d713be3ba950672c26e6d5e3ab031f.tar.xz |
Merge pull request #2025 from matrix-org/rav/no_reset_state_on_rejections
Avoid resetting state on rejected events
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 27f1ec89ec..1b42bea07a 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -136,6 +136,16 @@ class StateStore(SQLBaseStore): continue if context.current_state_ids is None: + # AFAIK, this can never happen + logger.error( + "Non-outlier event %s had current_state_ids==None", + event.event_id) + continue + + # if the event was rejected, just give it the same state as its + # predecessor. + if context.rejected: + state_groups[event.event_id] = context.prev_group continue state_groups[event.event_id] = context.state_group |