diff options
Diffstat (limited to 'src/zenhttp/httpasio.cpp')
| -rw-r--r-- | src/zenhttp/httpasio.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/zenhttp/httpasio.cpp b/src/zenhttp/httpasio.cpp index 4d1f35c2b..affe328e3 100644 --- a/src/zenhttp/httpasio.cpp +++ b/src/zenhttp/httpasio.cpp @@ -216,6 +216,8 @@ public: void InitializeForPayload(uint16_t ResponseCode, std::span<IoBuffer> BlobList) { + ZEN_TRACE_CPU("asio::InitializeForPayload"); + m_ResponseCode = ResponseCode; const uint32_t ChunkCount = gsl::narrow<uint32_t>(BlobList.size()); @@ -578,13 +580,15 @@ HttpServerConnection::HandleRequest() // TODO: should cork/uncork for Linux? - asio::async_write(*m_Socket.get(), - ResponseBuffers, - asio::transfer_exactly(ResponseLength), - [Conn = AsSharedPtr()](const asio::error_code& Ec, std::size_t ByteCount) { - Conn->OnResponseDataSent(Ec, ByteCount, true); - }); - + { + ZEN_TRACE_CPU("asio::async_write"); + asio::async_write(*m_Socket.get(), + ResponseBuffers, + asio::transfer_exactly(ResponseLength), + [Conn = AsSharedPtr()](const asio::error_code& Ec, std::size_t ByteCount) { + Conn->OnResponseDataSent(Ec, ByteCount, true); + }); + } return; } } |