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

Commit 4f3082d

Browse files
Fix get_pdu asking every remote destination even after it finds an event (#13346)
1 parent bf31155 commit 4f3082d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

changelog.d/13346.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix long-standing bugged logic which was never hit in `get_pdu` asking every remote destination even after it finds an event.

synapse/federation/federation_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,9 @@ async def get_pdu(
403403
# Prime the cache
404404
self._get_pdu_cache[event.event_id] = event
405405

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

410410
except SynapseError as e:
411411
logger.info(

0 commit comments

Comments
 (0)