From: Gunnar Beutner Date: Mon, 3 Sep 2012 10:20:04 +0000 (+0200) Subject: Bugfixes for the reconnection handler. X-Git-Tag: v0.0.1~120 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=569245a97679298d2719425d0a06d9e0a79ee2ae;p=icinga2 Bugfixes for the reconnection handler. --- diff --git a/icinga/endpointmanager.cpp b/icinga/endpointmanager.cpp index 4bbef5110..0703fc755 100644 --- a/icinga/endpointmanager.cpp +++ b/icinga/endpointmanager.cpp @@ -307,15 +307,19 @@ void EndpointManager::ReconnectTimerHandler(void) BOOST_FOREACH(tie(tuples::ignore, object), DynamicObject::GetObjects("Endpoint")) { Endpoint::Ptr endpoint = dynamic_pointer_cast(object); - if (endpoint->IsConnected()) + if (endpoint->IsConnected() || endpoint == m_Endpoint) continue; String node, service; node = endpoint->GetNode(); service = endpoint->GetService(); - if (node.IsEmpty() || service.IsEmpty()) + if (node.IsEmpty() || service.IsEmpty()) { + Logger::Write(LogWarning, "icinga", "Can't reconnect " + "to endpoint '" + endpoint->GetName() + "': No " + "node/service information."); continue; + } AddConnection(node, service); }