summary refs log tree commit diff
path: root/synapse/http/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r--synapse/http/server.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index 756c6e1aee..e3dcc3f3dd 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -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."
         )