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

Commit

Permalink
Fix get_pdu asking every destination even after it finds an event
Browse files Browse the repository at this point in the history
As discovered by @richvdh,
#13320 (comment)
  • Loading branch information
MadLittleMods committed Jul 20, 2022
1 parent 0f971ca commit 58317e6
Showing 1 changed file with 3 additions and 3 deletions.
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 58317e6

Please sign in to comment.