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

Commit

Permalink
Remove dead handled_events set in invite_join (#9394)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anoadragon453 authored Feb 12, 2021
1 parent 7950aa8 commit 594f285
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions changelog.d/9394.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove some dead code from the acceptance of room invites path.
6 changes: 0 additions & 6 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,8 +1354,6 @@ async def do_invite_join(

await self._clean_room_for_join(room_id)

handled_events = set()

try:
# Try the host we successfully got a response to /make_join/
# request first.
Expand All @@ -1375,10 +1373,6 @@ async def do_invite_join(
auth_chain = ret["auth_chain"]
auth_chain.sort(key=lambda e: e.depth)

handled_events.update([s.event_id for s in state])
handled_events.update([a.event_id for a in auth_chain])
handled_events.add(event.event_id)

logger.debug("do_invite_join auth_chain: %s", auth_chain)
logger.debug("do_invite_join state: %s", state)

Expand Down

0 comments on commit 594f285

Please sign in to comment.