mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6719 from Icinga/fix/finished-reconnect-message
Do not send 'finished reconnecting...' if failed
This commit is contained in:
commit
6de4cef3ae
|
@ -421,6 +421,8 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint)
|
||||||
NewClientHandler(client, endpoint->GetName(), RoleClient);
|
NewClientHandler(client, endpoint->GetName(), RoleClient);
|
||||||
|
|
||||||
endpoint->SetConnecting(false);
|
endpoint->SetConnecting(false);
|
||||||
|
Log(LogInformation, "ApiListener")
|
||||||
|
<< "Finished reconnecting to endpoint '" << endpoint->GetName() << "' via host '" << host << "' and port '" << port << "'";
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
endpoint->SetConnecting(false);
|
endpoint->SetConnecting(false);
|
||||||
client->Close();
|
client->Close();
|
||||||
|
@ -431,9 +433,6 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint)
|
||||||
Log(LogDebug, "ApiListener")
|
Log(LogDebug, "ApiListener")
|
||||||
<< info.str() << "\n" << DiagnosticInformation(ex);
|
<< 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)
|
void ApiListener::NewClientHandler(const Socket::Ptr& client, const String& hostname, ConnectionRole role)
|
||||||
|
|
Loading…
Reference in New Issue