Skip to content

Commit

Permalink
Fix get_pdu asking every remote destination even after it finds an …
Browse files Browse the repository at this point in the history
…event (matrix-org#13346)
  • Loading branch information
MadLittleMods authored and azmeuk committed Aug 8, 2022
1 parent 04ed45e commit 3430a0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/13346.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix long-standing bugged logic which was never hit in `get_pdu` asking every remote destination even after it finds an event.
6 changes: 3 additions & 3 deletions synapse/federation/federation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ async def get_pdu(
# Prime the cache
self._get_pdu_cache[event.event_id] = event

# FIXME: We should add a `break` here to avoid calling every
# destination after we already found a PDU (will follow-up
# in a separate PR)
# Now that we have an event, we can break out of this
# loop and stop asking other destinations.
break

except SynapseError as e:
logger.info(
Expand Down

0 comments on commit 3430a0e

Please sign in to comment.