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);