ApiListener#ApiTimerHandler(): delete all replayed logs

refs #6932
This commit is contained in:
Alexander A. Klimov 2019-04-17 13:52:13 +02:00
parent 5e3df67ab3
commit 9b489cf9b9
1 changed files with 8 additions and 0 deletions

View File

@ -741,11 +741,19 @@ void ApiListener::ApiTimerHandler()
for (int ts : files) {
bool need = false;
auto localZone (GetLocalEndpoint()->GetZone());
for (const Endpoint::Ptr& endpoint : ConfigType::GetObjectsByType<Endpoint>()) {
if (endpoint == GetLocalEndpoint())
continue;
auto zone (endpoint->GetZone());
/* only care for endpoints in a) the same zone b) our parent zone c) immediate child zones */
if (!(zone == localZone || zone == localZone->GetParent() || zone->GetParent() == localZone)) {
continue;
}
if (endpoint->GetLogDuration() >= 0 && ts < now - endpoint->GetLogDuration())
continue;