summaryrefslogtreecommitdiff
path: root/src/dnsmasq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnsmasq.c')
-rw-r--r--src/dnsmasq.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
index 858c731..bfd1f16 100644
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -1055,19 +1055,20 @@ int main (int argc, char **argv)
while (1)
{
- int timeout = -1;
+ int timeout = fast_retry(now);
poll_reset();
/* Whilst polling for the dbus, or doing a tftp transfer, wake every quarter second */
- if (daemon->tftp_trans ||
- (option_bool(OPT_DBUS) && !daemon->dbus))
+ if ((daemon->tftp_trans || (option_bool(OPT_DBUS) && !daemon->dbus)) &&
+ (timeout == -1 || timeout > 250))
timeout = 250;
-
+
/* Wake every second whilst waiting for DAD to complete */
- else if (is_dad_listeners())
+ else if (is_dad_listeners() &&
+ (timeout == -1 || timeout > 1000))
timeout = 1000;
-
+
set_dns_listeners();
#ifdef HAVE_DBUS