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 remote destination even after it finds an …
Browse files Browse the repository at this point in the history
…event (#13346)
  • Loading branch information
MadLittleMods authored Jul 27, 2022
1 parent bf31155 commit 4f3082d
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 4f3082d

Please sign in to comment.