mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Add SetCorked() calls to the JsonRpcConnection class
This commit is contained in:
parent
d0cf7c654e
commit
6848af50ff
@ -155,6 +155,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
|
||||||
@ -255,6 +257,8 @@ bool JsonRpcConnection::ProcessMessage()
|
|||||||
if (srs != StatusNewItem)
|
if (srs != StatusNewItem)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
m_Stream->SetCorked(true);
|
||||||
|
|
||||||
l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(std::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
|
l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(std::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user