Add SetCorked() calls to the JsonRpcConnection class

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

View File

@ -144,6 +144,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
@ -242,6 +244,8 @@ bool JsonRpcConnection::ProcessMessage(void)
if (srs != StatusNewItem)
return false;
m_Stream->SetCorked(true);
l_JsonRpcConnectionWorkQueues[m_ID % l_JsonRpcConnectionWorkQueueCount].Enqueue(boost::bind(&JsonRpcConnection::MessageHandlerWrapper, JsonRpcConnection::Ptr(this), message));
return true;