diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2013-02-13 08:00:46 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-02-13 08:45:13 -0500 |
commit | 1c00832624a146745c31ce5367330b1d2ca04088 (patch) | |
tree | d0b0c192cc0a7b923b6eb7100d3b5a88e6c4102a /src/delta | |
parent | a3aa7ee6ff7b3cc6e473367efd5fecf0f48f9635 (diff) |
ratelimit: fix off-by-one
The current code might make sense during startup for service restart
limiting:
With burst=1 after starting num is 1, so the next ('first') restart is
still accepted ( 1 <= 1). However, once interval has expired, num is 1
after the first restart, so the second restart is also accepted.
This change is also useful in combination with watchdogs:
With burst=1 and a very large interval the system can be restarted on
the first failure.
Diffstat (limited to 'src/delta')
0 files changed, 0 insertions, 0 deletions