OutgoingHttpMessage: reset m_CpuBoundWork only once in #StartStreaming()

not in every `#Flush()`.
This commit is contained in:
Alexander A. Klimov 2026-03-26 15:42:49 +01:00
parent a56388940e
commit c56cbaa15e

View file

@ -146,8 +146,6 @@ void OutgoingHttpMessage<isRequest, Body, StreamVariant>::Clear()
template<bool isRequest, typename Body, typename StreamVariant>
void OutgoingHttpMessage<isRequest, Body, StreamVariant>::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<isRequest, Body, StreamVariant>::Flush(boost::asio::yie
template<bool isRequest, typename Body, typename StreamVariant>
void OutgoingHttpMessage<isRequest, Body, StreamVariant>::StartStreaming()
{
m_CpuBoundWork.reset();
ASSERT(Base::body().Size() == 0 && !m_SerializationStarted);
Base::body().Start();
Base::chunked(true);