From 7acab5797d5ae03a70bbf72aab6b9df2acc26224 Mon Sep 17 00:00:00 2001 From: Sean Quah Date: Fri, 6 May 2022 20:21:14 +0100 Subject: [PATCH] Enable cancellation of `GET /rooms//state//*` requests Signed-off-by: Sean Quah --- synapse/rest/client/room.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py index 8f66777b5025..4b8bfbffcb36 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py @@ -143,6 +143,7 @@ def register(self, http_server: HttpServer) -> None: self.__class__.__name__, ) + @cancellable def on_GET_no_state_key( self, request: SynapseRequest, room_id: str, event_type: str ) -> Awaitable[Tuple[int, JsonDict]]: @@ -153,6 +154,7 @@ def on_PUT_no_state_key( ) -> Awaitable[Tuple[int, JsonDict]]: return self.on_PUT(request, room_id, event_type, "") + @cancellable async def on_GET( self, request: SynapseRequest, room_id: str, event_type: str, state_key: str ) -> Tuple[int, JsonDict]: