mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Log before & after an RPC client is disconnected
This commit is contained in:
parent
7ed5c6a2c7
commit
f2fbb61ad8
@ -207,10 +207,10 @@ void JsonRpcConnection::Disconnect()
|
|||||||
if (!m_ShuttingDown.exchange(true)) {
|
if (!m_ShuttingDown.exchange(true)) {
|
||||||
JsonRpcConnection::Ptr keepAlive (this);
|
JsonRpcConnection::Ptr keepAlive (this);
|
||||||
|
|
||||||
IoEngine::SpawnCoroutine(m_IoStrand, [this, keepAlive](asio::yield_context yc) {
|
Log(LogNotice, "JsonRpcConnection")
|
||||||
Log(LogWarning, "JsonRpcConnection")
|
<< "Disconnecting API client for identity '" << m_Identity << "'";
|
||||||
<< "API client disconnected for identity '" << m_Identity << "'";
|
|
||||||
|
|
||||||
|
IoEngine::SpawnCoroutine(m_IoStrand, [this, keepAlive](asio::yield_context yc) {
|
||||||
m_OutgoingMessagesQueued.Set();
|
m_OutgoingMessagesQueued.Set();
|
||||||
|
|
||||||
m_WriterDone.Wait(yc);
|
m_WriterDone.Wait(yc);
|
||||||
@ -225,6 +225,9 @@ void JsonRpcConnection::Disconnect()
|
|||||||
} else {
|
} else {
|
||||||
ApiListener::GetInstance()->RemoveAnonymousClient(this);
|
ApiListener::GetInstance()->RemoveAnonymousClient(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log(LogWarning, "JsonRpcConnection")
|
||||||
|
<< "API client disconnected for identity '" << m_Identity << "'";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user