Skip to content

Commit

Permalink
Make sure the loop delay is at least 0.
Browse files Browse the repository at this point in the history
Fixes: buildbot#826.
  • Loading branch information
Chris AtLee committed May 11, 2010
1 parent c7fb643 commit bcd0353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildbot/util/loop.py
Expand Up @@ -207,7 +207,7 @@ def _set_wakeup_timer(self):
# to avoid waking too frequently, this could be:
# delay=max(when-now,OCD_MINIMUM_DELAY)
# but that delays unrelated jobs that want to wake few seconds apart
delay = when - util.now(self._reactor)
delay = max(0, when - util.now(self._reactor))
if self._wakeup_timer:
self._wakeup_timer.reset(delay)
else:
Expand Down

0 comments on commit bcd0353

Please sign in to comment.