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