Downtime#Start(): trigger fixed downtimes immediately instead of waiting for the timer

... not to cause e.g. notifications if a problem occurs
between the downtime start time and the timer routine.
This commit is contained in:
Alexander A. Klimov 2021-06-23 19:16:15 +02:00
parent 2cd9c1d902
commit d8e5e07c4f
1 changed files with 8 additions and 0 deletions

View File

@ -127,6 +127,14 @@ void Downtime::Start(bool runtimeCreated)
<< " Triggering downtime now.";
TriggerDowntime();
}
if (GetFixed() && CanBeTriggered()) {
/* Send notifications. */
OnDowntimeStarted(this);
/* Trigger fixed downtime immediately. */
TriggerDowntime();
}
}
void Downtime::Stop(bool runtimeRemoved)