mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
Merge pull request #6896 from Icinga/bugfix/notification-delay-5561
Notification#BeginExecuteNotification(): SetNextNotification() correctly
This commit is contained in:
commit
30d98b49eb
@ -290,11 +290,9 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
|
|||||||
<< notificationName << "': before specified begin time (" << Utility::FormatDuration(timesBegin) << ")";
|
<< notificationName << "': before specified begin time (" << Utility::FormatDuration(timesBegin) << ")";
|
||||||
|
|
||||||
/* we need to adjust the next notification time
|
/* we need to adjust the next notification time
|
||||||
* to now + begin delaying the first notification
|
* delaying the first notification
|
||||||
*/
|
*/
|
||||||
double nextProposedNotification = now + timesBegin + 1.0;
|
SetNextNotification(checkable->GetLastHardStateChange() + timesBegin + 1.0);
|
||||||
if (GetNextNotification() > nextProposedNotification)
|
|
||||||
SetNextNotification(nextProposedNotification);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user