mirror of https://github.com/Icinga/icinga2.git
Add SetCorked() calls to the JsonRpcConnection class
This commit is contained in:
parent
8b334fe259
commit
85858e6a36
|
@ -144,6 +144,8 @@ void JsonRpcConnection::MessageHandlerWrapper(const String& jsonString)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
MessageHandler(jsonString);
|
MessageHandler(jsonString);
|
||||||
|
|
||||||
|
m_Stream->SetCorked(false);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
Log(LogWarning, "JsonRpcConnection")
|
Log(LogWarning, "JsonRpcConnection")
|
||||||
<< "Error while reading JSON-RPC message for identity '" << m_Identity
|
<< "Error while reading JSON-RPC message for identity '" << m_Identity
|
||||||
|
@ -242,6 +244,8 @@ bool JsonRpcConnection::ProcessMessage(void)
|
||||||
if (srs != StatusNewItem)
|
if (srs != StatusNewItem)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
m_Stream->SetCorked(true);
|
||||||
|
|
||||||
l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(boost::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
|
l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(boost::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue