From: Miroslav Lichvar Date: Thu, 9 Dec 2010 13:34:29 +0000 (+0100) Subject: Fix separation of timeouts scheduled for exactly the same time X-Git-Tag: 1.25-pre1~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4373918a2f2b9c5ae0d172d29d0a8b16e821f744;p=thirdparty%2Fchrony.git Fix separation of timeouts scheduled for exactly the same time --- diff --git a/sched.c b/sched.c index dacc9d29..369b03ea 100644 --- a/sched.c +++ b/sched.c @@ -346,8 +346,7 @@ SCH_AddTimeoutInClass(double min_delay, double separation, if (new_min_delay - diff < separation) { new_min_delay = diff + separation; } - } - if (new_min_delay < diff) { + } else { if (diff - new_min_delay < separation) { new_min_delay = diff + separation; }