mirror of https://github.com/Icinga/icinga2.git
Fixed infinite loop.
This commit is contained in:
parent
7ed19cd533
commit
1d7a3f6c75
|
@ -483,6 +483,9 @@ void DiscoveryComponent::DiscoveryTimerHandler(void)
|
|||
string identity = i->first;
|
||||
ComponentDiscoveryInfo::Ptr info = i->second;
|
||||
|
||||
curr = i;
|
||||
i++;
|
||||
|
||||
/* there's no need to reconnect to ourself */
|
||||
if (identity == GetEndpointManager()->GetIdentity())
|
||||
continue;
|
||||
|
@ -493,9 +496,6 @@ void DiscoveryComponent::DiscoveryTimerHandler(void)
|
|||
if (ConfigObject::GetObject("endpoint", identity))
|
||||
continue;
|
||||
|
||||
curr = i;
|
||||
i++;
|
||||
|
||||
if (info->LastSeen < now - DiscoveryComponent::RegistrationTTL) {
|
||||
/* unregister this component if its registration has expired */
|
||||
m_Components.erase(curr);
|
||||
|
|
Loading…
Reference in New Issue