From: Noah Hilverling Date: Thu, 9 Aug 2018 06:29:27 +0000 (+0200) Subject: Do not send 'finished reconnecting...' if failed X-Git-Tag: v2.11.0-rc1~315^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b977b2c5280afb889ff4fb946683c1e762f7107;p=icinga2 Do not send 'finished reconnecting...' if failed --- diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index c7ba834b4..04ffe1449 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -393,6 +393,8 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint) client->Connect(host, port); NewClientHandler(client, serverName, RoleClient); endpoint->SetConnecting(false); + Log(LogInformation, "ApiListener") + << "Finished reconnecting to endpoint '" << endpoint->GetName() << "' via host '" << host << "' and port '" << port << "'"; } catch (const std::exception& ex) { endpoint->SetConnecting(false); client->Close(); @@ -403,9 +405,6 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint) Log(LogDebug, "ApiListener") << info.str() << "\n" << DiagnosticInformation(ex); } - - Log(LogInformation, "ApiListener") - << "Finished reconnecting to endpoint '" << endpoint->GetName() << "' via host '" << host << "' and port '" << port << "'"; } void ApiListener::NewClientHandler(const Socket::Ptr& client, const String& hostname, ConnectionRole role)