Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix logic for dropping old events in fed queue
Browse files Browse the repository at this point in the history
Fixes infinite loops of

> logger.info("Invalid prev_events for %s", event_id)
  • Loading branch information
richvdh committed Jan 23, 2022
1 parent 7977b7f commit 2b9f741
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion synapse/storage/databases/main/event_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,10 @@ async def prune_staged_events_in_room(

if room_version.event_format == EventFormatVersions.V1:
for prev_event_tuple in prev_events:
if not isinstance(prev_event_tuple, list) or len(prev_events) != 2:
if (
not isinstance(prev_event_tuple, list)
or len(prev_event_tuple) != 2
):
logger.info("Invalid prev_events for %s", event_id)
break

Expand Down

0 comments on commit 2b9f741

Please sign in to comment.