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

Commit 594f285

Browse files
Remove dead handled_events set in invite_join (#9394)
This PR removes a set that was created and [initially used](1d2a004#diff-0bc92da3d703202f5b9be2d3f845e375f5b1a6bc6ba61705a8af9be1121f5e42R435-R436), but is no longer today. May help cut down a bit on the time it takes to accept invites.
1 parent 7950aa8 commit 594f285

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

changelog.d/9394.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove some dead code from the acceptance of room invites path.

synapse/handlers/federation.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,8 +1354,6 @@ async def do_invite_join(
13541354

13551355
await self._clean_room_for_join(room_id)
13561356

1357-
handled_events = set()
1358-
13591357
try:
13601358
# Try the host we successfully got a response to /make_join/
13611359
# request first.
@@ -1375,10 +1373,6 @@ async def do_invite_join(
13751373
auth_chain = ret["auth_chain"]
13761374
auth_chain.sort(key=lambda e: e.depth)
13771375

1378-
handled_events.update([s.event_id for s in state])
1379-
handled_events.update([a.event_id for a in auth_chain])
1380-
handled_events.add(event.event_id)
1381-
13821376
logger.debug("do_invite_join auth_chain: %s", auth_chain)
13831377
logger.debug("do_invite_join state: %s", state)
13841378

0 commit comments

Comments
 (0)