mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
OutgoingHttpMessage: reset m_CpuBoundWork only once in #StartStreaming()
not in every `#Flush()`.
This commit is contained in:
parent
a56388940e
commit
c56cbaa15e
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue