From c97f3c80f550320abcbc3bcbaa0a3673c2091c34 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Fri, 11 Jan 2019 16:16:45 +0100 Subject: [PATCH] Fix checkresults from the future breaking checks --- lib/icinga/checkable-check.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 0b8917b77..09fa901e1 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -170,8 +170,8 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig long old_attempt = GetCheckAttempt(); bool recovery = false; - /* Ignore check results older than the current one. */ - if (old_cr && cr->GetExecutionStart() < old_cr->GetExecutionStart()) + /* Ignore check results older than the current one, except if the previous check result is from the future. */ + if (old_cr && cr->GetExecutionStart() < old_cr->GetExecutionStart() && old_cr->GetExecutionStart() < now) return; /* The ExecuteCheck function already sets the old state, but we need to do it again