mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Merge pull request #7926 from Icinga/bugfix/jsonrpcconnection-handleandwriteheartbeats-m_endpoint-getname
JsonRpcConnection#HandleAndWriteHeartbeats(): check !!#m_Endpoint
This commit is contained in:
commit
84b052b314
@ -28,9 +28,17 @@ void JsonRpcConnection::HandleAndWriteHeartbeats(boost::asio::yield_context yc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_NextHeartbeat != 0 && m_NextHeartbeat < Utility::GetTime()) {
|
if (m_NextHeartbeat != 0 && m_NextHeartbeat < Utility::GetTime()) {
|
||||||
Log(LogWarning, "JsonRpcConnection")
|
{
|
||||||
<< "Client for endpoint '" << m_Endpoint->GetName() << "' has requested "
|
Log logMsg (LogWarning, "JsonRpcConnection");
|
||||||
<< "heartbeat message but hasn't responded in time. Closing connection.";
|
|
||||||
|
if (m_Endpoint) {
|
||||||
|
logMsg << "Client for endpoint '" << m_Endpoint->GetName() << "'";
|
||||||
|
} else {
|
||||||
|
logMsg << "Anonymous client";
|
||||||
|
}
|
||||||
|
|
||||||
|
logMsg << " has requested heartbeat message but hasn't responded in time. Closing connection.";
|
||||||
|
}
|
||||||
|
|
||||||
Disconnect();
|
Disconnect();
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user