mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
tweak ra timer code to avoid missing events.
This commit is contained in:
@@ -395,11 +395,11 @@ time_t periodic_ra(time_t now)
|
||||
for (next_event = 0, context = daemon->ra_contexts; context; context = context->next)
|
||||
if (context->ra_time != 0)
|
||||
{
|
||||
if (difftime(context->ra_time, now) < 0.0)
|
||||
if (difftime(context->ra_time, now) <= 0.0)
|
||||
break; /* overdue */
|
||||
|
||||
if (next_event == 0 || difftime(next_event, context->ra_time + 2) > 0.0)
|
||||
next_event = context->ra_time + 2;
|
||||
if (next_event == 0 || difftime(next_event, context->ra_time) > 0.0)
|
||||
next_event = context->ra_time;
|
||||
}
|
||||
|
||||
/* none overdue */
|
||||
|
||||
Reference in New Issue
Block a user