Remove dead handled_events set in invite_join (#9394)

This PR removes a set that was created and [initially used](1d2a0040cf (diff-0bc92da3d703202f5b9be2d3f845e375f5b1a6bc6ba61705a8af9be1121f5e42R435-R436)), but is no longer today.

May help cut down a bit on the time it takes to accept invites.
This commit is contained in:
Andrew Morgan 2021-02-12 22:15:50 +00:00 committed by GitHub
parent 7950aa8a27
commit 594f2853e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

1
changelog.d/9394.misc Normal file
View File

@ -0,0 +1 @@
Remove some dead code from the acceptance of room invites path.

View File

@ -1354,8 +1354,6 @@ class FederationHandler(BaseHandler):
await self._clean_room_for_join(room_id) await self._clean_room_for_join(room_id)
handled_events = set()
try: try:
# Try the host we successfully got a response to /make_join/ # Try the host we successfully got a response to /make_join/
# request first. # request first.
@ -1375,10 +1373,6 @@ class FederationHandler(BaseHandler):
auth_chain = ret["auth_chain"] auth_chain = ret["auth_chain"]
auth_chain.sort(key=lambda e: e.depth) 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 auth_chain: %s", auth_chain)
logger.debug("do_invite_join state: %s", state) logger.debug("do_invite_join state: %s", state)