(min_to_next_daytime): Happily returned zero if DTIME happend to be in
TIMES. This can make callers fire another update right away, possibly several times. Observed for update policy UDP_TIMES while updates were disabled, which makes them complete in much less than a second. Fills up server.log real fast. Fix to consider DTIME tomorrow.
This commit is contained in:
parent
240eb32b76
commit
2eb3b4a4d2
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ min_to_next_daytime(int dtime, char *times)
|
||||||
|
|
||||||
if (times) {
|
if (times) {
|
||||||
while (NULL != (times = daytime(times, &dt))) {
|
while (NULL != (times = daytime(times, &dt))) {
|
||||||
if (dt < dtime)
|
if (dt <= dtime)
|
||||||
dt += 24 * 60; /* tomorrow */
|
dt += 24 * 60; /* tomorrow */
|
||||||
if (dt < mindt)
|
if (dt < mindt)
|
||||||
mindt = dt;
|
mindt = dt;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue