mirror of https://github.com/Icinga/icinga2.git
Notification#BeginExecuteNotification(): SetNextNotification() correctly
refs #5561
This commit is contained in:
parent
b46c3c11bb
commit
3b2054761a
|
@ -288,11 +288,9 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
|
||||||
<< "': before specified begin time (" << Utility::FormatDuration(timesBegin) << ")";
|
<< "': 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…
Reference in New Issue