From 9ae738d17fa6220d988001e4c56155aa6535992c Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 9 Jan 2019 11:27:33 +0100 Subject: [PATCH] Allow Checkable#retry_interval to be 0 refs #6871 --- lib/icinga/checkable-check.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index e70648d89..b159247a9 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -79,7 +79,8 @@ void Checkable::UpdateNextCheck(const MessageOrigin::Ptr& origin) if (interval > 1) adj = fmod(now * 100 + GetSchedulingOffset(), interval * 100) / 100.0; - adj = std::min(0.5 + fmod(GetSchedulingOffset(), interval * 5) / 100.0, adj); + if (adj != 0.0) + adj = std::min(0.5 + fmod(GetSchedulingOffset(), interval * 5) / 100.0, adj); double nextCheck = now - adj + interval;