summary refs log tree commit diff
path: root/synapse/http/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-06-21 16:11:57 +0100
committerErik Johnston <erik@matrix.org>2024-07-02 16:24:05 +0100
commitc9a743d0534aae7d415f0b0072fae04d32d03b20 (patch)
tree5849da93f4cea32e1f2b4d6565251ba705b32c6f /synapse/http/server.py
parentWIP (diff)
downloadsynapse-c9a743d0534aae7d415f0b0072fae04d32d03b20.tar.xz
Fixup
Diffstat (limited to '')
-rw-r--r--synapse/http/server.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index ebd153ea8c..c2d416ac4b 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -334,10 +334,7 @@ class _AsyncResource(resource.Resource, metaclass=abc.ABCMeta):
             request.request_metrics.name = self.__class__.__name__
 
             with trace_servlet(request, self._extract_context):
-                callback_return = await measure_coroutine(
-                    request.request_metrics.name, self._async_render(request)
-                )
-
+                callback_return = await self._async_render(request)
                 if callback_return is not None:
                     code, response = callback_return
                     self._send_response(request, code, response)
@@ -368,7 +365,9 @@ class _AsyncResource(resource.Resource, metaclass=abc.ABCMeta):
 
             # Is it synchronous? We'll allow this for now.
             if isawaitable(raw_callback_return):
-                callback_return = await raw_callback_return
+                callback_return = await measure_coroutine(
+                    request.request_metrics.name, raw_callback_return
+                )
             else:
                 callback_return = raw_callback_return