From d8e5e07c4fdaf7166afa312f90256b579d352f15 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 23 Jun 2021 19:16:15 +0200 Subject: [PATCH] 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. --- lib/icinga/downtime.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index dea06a40b..914531339 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -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)