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

Commit 58317e6

Browse files
committed
Fix get_pdu asking every destination even after it finds an event
As discovered by @richvdh, #13320 (comment)
1 parent 0f971ca commit 58317e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)