From 8b1579381ebd13c45981c633b284bd418eb725a6 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 1 Jul 2014 08:57:57 +0200 Subject: [PATCH] Revert "Fix another deadlock in ApiClient::SendMessage" This reverts commit a0c09303251d22738f82a9c35a66d327c98699a3. --- lib/remote/apiclient.cpp | 2 +- lib/remote/apiclient.hpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/remote/apiclient.cpp b/lib/remote/apiclient.cpp index f48a9873c..9203094f1 100644 --- a/lib/remote/apiclient.cpp +++ b/lib/remote/apiclient.cpp @@ -67,7 +67,7 @@ ConnectionRole ApiClient::GetRole(void) const void ApiClient::SendMessage(const Dictionary::Ptr& message) { try { - boost::mutex::scoped_lock lock(m_WriteMutex); + ObjectLock olock(m_Stream); JsonRpc::SendMessage(m_Stream, message); if (message->Get("method") != "log::SetLogPosition") m_Seen = Utility::GetTime(); diff --git a/lib/remote/apiclient.hpp b/lib/remote/apiclient.hpp index 666262eaa..b491708c0 100644 --- a/lib/remote/apiclient.hpp +++ b/lib/remote/apiclient.hpp @@ -58,7 +58,6 @@ public: void SendMessage(const Dictionary::Ptr& request); private: - boost::mutex m_WriteMutex; String m_Identity; Endpoint::Ptr m_Endpoint; Stream::Ptr m_Stream;