mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-15 17:54:33 +02:00
Fixed problem with keeping subscriptions properly synchronized.
This commit is contained in:
parent
5649f3efb2
commit
c9a74ef3ed
@ -172,6 +172,21 @@ void EndpointManager::RegisterEndpoint(Endpoint::Ptr endpoint)
|
|||||||
} else {
|
} else {
|
||||||
m_PendingEndpoints.push_back(endpoint);
|
m_PendingEndpoints.push_back(endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (endpoint->IsLocal()) {
|
||||||
|
/* this endpoint might have introduced new subscriptions
|
||||||
|
* or publications which affect remote endpoints, we need
|
||||||
|
* to close all fully-connected remote endpoints to make sure
|
||||||
|
* these subscriptions/publications are kept up-to-date. */
|
||||||
|
Iterator prev, it;
|
||||||
|
for (it = m_Endpoints.begin(); it != m_Endpoints.end(); ) {
|
||||||
|
prev = it;
|
||||||
|
it++;
|
||||||
|
|
||||||
|
if (!prev->second->IsLocal())
|
||||||
|
m_Endpoints.erase(prev);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user