From c61736e903a1db989a5d58c74a0bd561f33efa01 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 4 May 2018 10:33:09 +0800 Subject: [PATCH] Set the minimum resolv timeout to be one second --- src/resolv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resolv.c b/src/resolv.c index ed8ea76f..1785f766 100644 --- a/src/resolv.c +++ b/src/resolv.c @@ -448,6 +448,7 @@ reset_timer() return; } float repeat = tv->tv_sec + tv->tv_usec / 1000000. + 1e-9; + repeat = repeat < 1.f ? 1.f : repeat; ev_timer_set(&default_ctx.tw, repeat, repeat); ev_timer_again(default_loop, &default_ctx.tw); }