Skip to content
Snippets Groups Projects
Unverified Commit ba882c03 authored by reivilibre's avatar reivilibre Committed by GitHub
Browse files

Faster Room Joins: fix `/make_knock` blocking indefinitely when the room in...

Faster Room Joins: fix `/make_knock` blocking indefinitely when the room in question is a partial-stated room. (#13583)

Co-authored-by: default avatarSean Quah <8349537+squahtx@users.noreply.github.com>
parent 7af07f97
No related branches found
No related tags found
No related merge requests found
Faster Room Joins: fix `/make_knock` blocking indefinitely when the room in question is a partial-stated room.
\ No newline at end of file
...@@ -763,6 +763,17 @@ class FederationServer(FederationBase): ...@@ -763,6 +763,17 @@ class FederationServer(FederationBase):
The partial knock event. The partial knock event.
""" """
origin_host, _ = parse_server_name(origin) origin_host, _ = parse_server_name(origin)
if await self.store.is_partial_state_room(room_id):
# Before we do anything: check if the room is partial-stated.
# Note that at the time this check was added, `on_make_knock_request` would
# block due to https://github.com/matrix-org/synapse/issues/12997.
raise SynapseError(
404,
"Unable to handle /make_knock right now; this server is not fully joined.",
errcode=Codes.NOT_FOUND,
)
await self.check_server_matches_acl(origin_host, room_id) await self.check_server_matches_acl(origin_host, room_id)
room_version = await self.store.get_room_version(room_id) room_version = await self.store.get_room_version(room_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment