mirror of https://github.com/Icinga/icinga2.git
Bugfixes for the reconnection handler.
This commit is contained in:
parent
49a979f966
commit
569245a976
|
@ -307,15 +307,19 @@ void EndpointManager::ReconnectTimerHandler(void)
|
|||
BOOST_FOREACH(tie(tuples::ignore, object), DynamicObject::GetObjects("Endpoint")) {
|
||||
Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue