Merge pull request #10237 from Icinga/log-connected-endpoint-connection-attempts-214

ApiListener: Log connection attempts from an already connected client
This commit is contained in:
Yonas Habteab 2024-11-14 12:57:41 +01:00 committed by GitHub
commit eb32283751
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -843,9 +843,11 @@ void ApiListener::NewClientHandlerInternal(
Log(LogNotice, "ApiListener", "New JSON-RPC client");
if (endpoint && endpoint->GetConnected()) {
Log(LogNotice, "ApiListener")
Log(LogInformation, "ApiListener")
<< "Ignoring JSON-RPC connection " << conninfo
<< ". We're already connected to Endpoint '" << endpoint->GetName() << "'.";
<< ". We're already connected to Endpoint '" << endpoint->GetName()
<< "' (last message sent: " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", endpoint->GetLastMessageSent())
<< ", last message received: " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", endpoint->GetLastMessageReceived()) << ").";
return;
}