diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index 086435236..a9d23731b 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -482,13 +482,7 @@ void Downtime::DowntimesStartTimerHandler() void Downtime::DowntimesExpireTimerHandler() { - std::vector downtimes; - for (const Downtime::Ptr& downtime : ConfigType::GetObjectsByType()) { - downtimes.push_back(downtime); - } - - for (const Downtime::Ptr& downtime : downtimes) { /* Only remove downtimes which are activated after daemon start. */ if (downtime->IsActive() && (downtime->IsExpired() || !downtime->HasValidConfigOwner())) RemoveDowntime(downtime->GetName(), false, false, true);