Skip to content

Commit

Permalink
Downtime#HasValidConfigOwner(): wait for ScheduledDowntimes
Browse files Browse the repository at this point in the history
refs #6542

(cherry picked from commit 39e0d78)
  • Loading branch information
Al2Klimov authored and Michael Friedrich committed Feb 11, 2019
1 parent 7c71218 commit a242569
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/icinga/downtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ bool Downtime::IsExpired() const

bool Downtime::HasValidConfigOwner() const
{
if (!ScheduledDowntime::AllConfigIsLoaded()) {
return true;
}

String configOwner = GetConfigOwner();
return configOwner.IsEmpty() || GetObject<ScheduledDowntime>(configOwner);
}
Expand Down

0 comments on commit a242569

Please sign in to comment.