Allow Checkable#retry_interval to be 0

refs #6871
This commit is contained in:
Alexander A. Klimov 2019-01-09 11:27:33 +01:00
parent b46c3c11bb
commit 9ae738d17f
1 changed files with 2 additions and 1 deletions

View File

@ -79,6 +79,7 @@ void Checkable::UpdateNextCheck(const MessageOrigin::Ptr& origin)
if (interval > 1)
adj = fmod(now * 100 + GetSchedulingOffset(), interval * 100) / 100.0;
if (adj != 0.0)
adj = std::min(0.5 + fmod(GetSchedulingOffset(), interval * 5) / 100.0, adj);
double nextCheck = now - adj + interval;