mirror of https://github.com/Icinga/icinga2.git
Fix that custom notifications do not reset force_next_notification
This attribute is stored in the state file forever as well. Will cause forced notifications ignoring state/type filters. fixes #12670
This commit is contained in:
parent
23e30ccb67
commit
a13e6b3e87
|
@ -48,14 +48,14 @@ void Checkable::SendNotifications(NotificationType type, const CheckResult::Ptr&
|
|||
|
||||
bool force = GetForceNextNotification();
|
||||
|
||||
SetForceNextNotification(false);
|
||||
|
||||
if (!IcingaApplication::GetInstance()->GetEnableNotifications() || !GetEnableNotifications()) {
|
||||
if (!force) {
|
||||
Log(LogInformation, "Checkable")
|
||||
<< "Notifications are disabled for service '" << GetName() << "'.";
|
||||
return;
|
||||
}
|
||||
|
||||
SetForceNextNotification(false);
|
||||
}
|
||||
|
||||
Log(LogInformation, "Checkable")
|
||||
|
|
Loading…
Reference in New Issue