mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:06:07 -04:00
Enable cancellation of GET /members
and GET /state
requests (#12708)
Enable cancellation of `GET /rooms/$room_id/members`, `GET /rooms/$room_id/state` and `GET /rooms/$room_id/state/$state_key/*` requests. Signed-off-by: Sean Quah <seanq@element.io>
This commit is contained in:
parent
db10f2c037
commit
bf7ce92bf7
3 changed files with 9 additions and 2 deletions
|
@ -139,7 +139,9 @@ def cancellable(method: F) -> F:
|
|||
async def on_GET(self, request: SynapseRequest) -> ...:
|
||||
...
|
||||
"""
|
||||
if method.__name__ not in _cancellable_method_names:
|
||||
if method.__name__ not in _cancellable_method_names and not any(
|
||||
method.__name__.startswith(prefix) for prefix in _cancellable_method_names
|
||||
):
|
||||
raise ValueError(
|
||||
"@cancellable decorator can only be applied to servlet methods."
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue