From 85858e6a36246dc5ac4e129d0f48f09b88b6558e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 28 Feb 2018 11:42:05 +0100 Subject: [PATCH] Add SetCorked() calls to the JsonRpcConnection class --- lib/remote/jsonrpcconnection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/remote/jsonrpcconnection.cpp b/lib/remote/jsonrpcconnection.cpp index 0be3fb46e..161a9d015 100644 --- a/lib/remote/jsonrpcconnection.cpp +++ b/lib/remote/jsonrpcconnection.cpp @@ -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; -- 2.40.0