mirror of https://github.com/Icinga/icinga2.git
JsonRpcConnection#HandleAndWriteHeartbeats(): check !!#m_Endpoint
This commit is contained in:
parent
e9b8fc234b
commit
5e7a675009
|
@ -28,9 +28,17 @@ void JsonRpcConnection::HandleAndWriteHeartbeats(boost::asio::yield_context yc)
|
|||
}
|
||||
|
||||
if (m_NextHeartbeat != 0 && m_NextHeartbeat < Utility::GetTime()) {
|
||||
Log(LogWarning, "JsonRpcConnection")
|
||||
<< "Client for endpoint '" << m_Endpoint->GetName() << "' has requested "
|
||||
<< "heartbeat message but hasn't responded in time. Closing connection.";
|
||||
{
|
||||
Log logMsg (LogWarning, "JsonRpcConnection");
|
||||
|
||||
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();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue