mirror of https://github.com/Icinga/icinga2.git
parent
0529d51a85
commit
c1892a2f30
|
@ -91,12 +91,6 @@ ConnectionRole JsonRpcConnection::GetRole(void) const
|
|||
}
|
||||
|
||||
void JsonRpcConnection::SendMessage(const Dictionary::Ptr& message)
|
||||
{
|
||||
if (!m_Stream->IsEof())
|
||||
m_WriteQueue.Enqueue(boost::bind(&JsonRpcConnection::SendMessageSync, JsonRpcConnection::Ptr(this), message), true);
|
||||
}
|
||||
|
||||
void JsonRpcConnection::SendMessageSync(const Dictionary::Ptr& message)
|
||||
{
|
||||
try {
|
||||
ObjectLock olock(m_Stream);
|
||||
|
@ -120,8 +114,6 @@ void JsonRpcConnection::Disconnect(void)
|
|||
|
||||
m_Stream->Close();
|
||||
|
||||
m_WriteQueue.Join();
|
||||
|
||||
if (m_Endpoint)
|
||||
m_Endpoint->RemoveClient(this);
|
||||
else {
|
||||
|
|
|
@ -83,11 +83,8 @@ private:
|
|||
|
||||
StreamReadContext m_Context;
|
||||
|
||||
WorkQueue m_WriteQueue;
|
||||
|
||||
bool ProcessMessage(void);
|
||||
void DataAvailableHandler(void);
|
||||
void SendMessageSync(const Dictionary::Ptr& request);
|
||||
|
||||
static void StaticInitialize(void);
|
||||
static void TimeoutTimerHandler(void);
|
||||
|
|
Loading…
Reference in New Issue