From 5c77e6eafe43236cc2f02f2cda301ec0e6aad5e0 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 2 Sep 2015 07:39:40 +0200 Subject: [PATCH] Fix deadlock in ApiListener::RelayMessage fixes #10002 --- lib/remote/apilistener.cpp | 2 +- lib/remote/jsonrpcconnection.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index ed53f2478..cb1b6c3f1 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -510,7 +510,7 @@ void ApiListener::ApiTimerHandler(void) void ApiListener::RelayMessage(const MessageOrigin::Ptr& origin, const ConfigObject::Ptr& secobj, const Dictionary::Ptr& message, bool log) { - m_RelayQueue.Enqueue(boost::bind(&ApiListener::SyncRelayMessage, this, origin, secobj, message, log)); + m_RelayQueue.Enqueue(boost::bind(&ApiListener::SyncRelayMessage, this, origin, secobj, message, log), true); } void ApiListener::PersistMessage(const Dictionary::Ptr& message, const ConfigObject::Ptr& secobj) diff --git a/lib/remote/jsonrpcconnection.cpp b/lib/remote/jsonrpcconnection.cpp index bb62c4414..6d67e10e6 100644 --- a/lib/remote/jsonrpcconnection.cpp +++ b/lib/remote/jsonrpcconnection.cpp @@ -90,7 +90,7 @@ ConnectionRole JsonRpcConnection::GetRole(void) const void JsonRpcConnection::SendMessage(const Dictionary::Ptr& message) { - m_WriteQueue.Enqueue(boost::bind(&JsonRpcConnection::SendMessageSync, JsonRpcConnection::Ptr(this), message)); + m_WriteQueue.Enqueue(boost::bind(&JsonRpcConnection::SendMessageSync, JsonRpcConnection::Ptr(this), message), true); } void JsonRpcConnection::SendMessageSync(const Dictionary::Ptr& message) -- 2.40.0