Add SetCorked() calls to the JsonRpcConnection class

This commit is contained in:
Gunnar Beutner 2018-02-28 11:42:05 +01:00
parent d0cf7c654e
commit 6848af50ff
1 changed files with 4 additions and 0 deletions

View File

@ -155,6 +155,8 @@ void JsonRpcConnection::MessageHandlerWrapper(const String& jsonString)
try {
MessageHandler(jsonString);
m_Stream->SetCorked(false);
} catch (const std::exception& ex) {
Log(LogWarning, "JsonRpcConnection")
<< "Error while reading JSON-RPC message for identity '" << m_Identity
@ -255,6 +257,8 @@ bool JsonRpcConnection::ProcessMessage()
if (srs != StatusNewItem)
return false;
m_Stream->SetCorked(true);
l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(std::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
return true;