From c56cbaa15e52fc4abab49d886e4fe1d217fe4614 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 26 Mar 2026 15:42:49 +0100 Subject: [PATCH] OutgoingHttpMessage: reset m_CpuBoundWork only once in `#StartStreaming()` not in every `#Flush()`. --- lib/remote/httpmessage.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/remote/httpmessage.cpp b/lib/remote/httpmessage.cpp index 7641e75ab..744cc49bd 100644 --- a/lib/remote/httpmessage.cpp +++ b/lib/remote/httpmessage.cpp @@ -146,8 +146,6 @@ void OutgoingHttpMessage::Clear() template void OutgoingHttpMessage::Flush(boost::asio::yield_context yc, bool finish) { - m_CpuBoundWork.reset(); - if (!Base::chunked() && !Base::has_content_length()) { ASSERT(!m_SerializationStarted); Base::prepare_payload(); @@ -185,6 +183,7 @@ void OutgoingHttpMessage::Flush(boost::asio::yie template void OutgoingHttpMessage::StartStreaming() { + m_CpuBoundWork.reset(); ASSERT(Base::body().Size() == 0 && !m_SerializationStarted); Base::body().Start(); Base::chunked(true);