aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/cache/httpstructuredcache.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-04 15:46:11 +0200
committerDan Engelbrecht <[email protected]>2023-10-04 15:46:47 +0200
commit347bbfcb2913889c43411d4c9113f0274bffde92 (patch)
tree971d7d50cedca8648e879ff7e857e3b3e0c45357 /src/zenserver/cache/httpstructuredcache.cpp
parentchangelog (diff)
downloadzen-347bbfcb2913889c43411d4c9113f0274bffde92.tar.xz
zen-347bbfcb2913889c43411d4c9113f0274bffde92.zip
fix HandleRpcRequest::WriteResponseAsync trace scope when we are not running async
Diffstat (limited to 'src/zenserver/cache/httpstructuredcache.cpp')
-rw-r--r--src/zenserver/cache/httpstructuredcache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp
index f3d5506eb..4a3f5f269 100644
--- a/src/zenserver/cache/httpstructuredcache.cpp
+++ b/src/zenserver/cache/httpstructuredcache.cpp
@@ -1750,7 +1750,6 @@ HttpStructuredCacheService::HandleRpcRequest(HttpServerRequest& Request)
auto HandleRpc =
[this, RequestContext, Body = Request.ReadPayload(), ContentType, AcceptType](HttpServerRequest& AsyncRequest) mutable {
- ZEN_TRACE_CPU("z$::Http::HandleRpcRequest::WriteResponseAsync");
std::uint64_t RequestIndex =
m_RequestRecorder ? m_RequestRecorder->RecordRequest(ContentType, AcceptType, Body) : ~0ull;
uint32_t AcceptMagic = 0;
@@ -1811,10 +1810,12 @@ HttpStructuredCacheService::HandleRpcRequest(HttpServerRequest& Request)
if (HasUpstream)
{
+ ZEN_TRACE_CPU("z$::Http::HandleRpcRequest::WriteResponseAsync");
Request.WriteResponseAsync(std::move(HandleRpc));
}
else
{
+ ZEN_TRACE_CPU("z$::Http::HandleRpcRequest::WriteResponse");
HandleRpc(Request);
}
}