mirror of https://github.com/Icinga/icinga2.git
Fix crash with anonymous clients on certificate signing request and storing sent bytes
refs #5753
This commit is contained in:
parent
d578b742ac
commit
ad7e801db9
|
@ -114,10 +114,15 @@ void JsonRpcConnection::SendMessage(const Dictionary::Ptr& message)
|
|||
{
|
||||
try {
|
||||
ObjectLock olock(m_Stream);
|
||||
|
||||
if (m_Stream->IsEof())
|
||||
return;
|
||||
|
||||
size_t bytesSent = JsonRpc::SendMessage(m_Stream, message);
|
||||
m_Endpoint->AddMessageSent(bytesSent);
|
||||
|
||||
if (m_Endpoint)
|
||||
m_Endpoint->AddMessageSent(bytesSent);
|
||||
|
||||
} catch (const std::exception& ex) {
|
||||
std::ostringstream info;
|
||||
info << "Error while sending JSON-RPC message for identity '" << m_Identity << "'";
|
||||
|
|
Loading…
Reference in New Issue