Fix a potential deadlock in ApiClient::Disconnect

refs #6724
This commit is contained in:
Gunnar Beutner 2014-08-04 09:50:47 +02:00
parent 541dacb636
commit 6455c51777
2 changed files with 6 additions and 0 deletions

View File

@ -94,6 +94,11 @@ void ApiClient::SendMessageSync(const Dictionary::Ptr& message)
}
void ApiClient::Disconnect(void)
{
Utility::QueueAsyncCallback(boost::bind(&ApiClient::DisconnectSync, this));
}
void ApiClient::DisconnectSync(void)
{
Log(LogWarning, "ApiClient", "API client disconnected for identity '" + m_Identity + "'");

View File

@ -55,6 +55,7 @@ public:
ConnectionRole GetRole(void) const;
void Disconnect(void);
void DisconnectSync(void);
void SendMessage(const Dictionary::Ptr& request);