mirror of
https://github.com/element-hq/synapse
synced 2024-09-19 05:55:14 +00:00
Fixup
This commit is contained in:
parent
c9a743d053
commit
3368c1cb0a
1 changed files with 3 additions and 1 deletions
|
@ -547,7 +547,9 @@ class JsonResource(DirectServeJsonResource):
|
||||||
|
|
||||||
# Is it synchronous? We'll allow this for now.
|
# Is it synchronous? We'll allow this for now.
|
||||||
if isinstance(raw_callback_return, (defer.Deferred, types.CoroutineType)):
|
if isinstance(raw_callback_return, (defer.Deferred, types.CoroutineType)):
|
||||||
callback_return = await raw_callback_return
|
callback_return = await measure_coroutine(
|
||||||
|
request.request_metrics.name, raw_callback_return
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
callback_return = raw_callback_return
|
callback_return = raw_callback_return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue