From 6848af50ffe6719e2d8f3580c8ee9606b0022df7 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 c1895934c..978cd9658 100644 --- a/lib/remote/jsonrpcconnection.cpp +++ b/lib/remote/jsonrpcconnection.cpp @@ -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; -- 2.49.0