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

Enable cancellation of GET /members and GET /state requests #12708

Merged
merged 6 commits into from
May 11, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions synapse/rest/client/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ def __init__(self, hs: "HomeServer"):
self.message_handler = hs.get_message_handler()
self.auth = hs.get_auth()

@cancellable
async def on_GET(
Comment on lines +608 to 609
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly---is it easy to summarise why this is safe? I suppose the fact that we're doing a GET suggests that we'll only be reading data, not writing it... which sounds generally safer to cancel.(?)

self, request: SynapseRequest, room_id: str
) -> Tuple[int, List[JsonDict]]:
Expand Down