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 { 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;