Browse Source

Set the minimum resolv timeout to be one second

pull/2039/head
Max Lv 6 years ago
parent
commit
c61736e903
1 changed files with 1 additions and 0 deletions
  1. 1
      src/resolv.c

1
src/resolv.c

@ -448,6 +448,7 @@ reset_timer()
return; return;
} }
float repeat = tv->tv_sec + tv->tv_usec / 1000000. + 1e-9; 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_set(&default_ctx.tw, repeat, repeat);
ev_timer_again(default_loop, &default_ctx.tw); ev_timer_again(default_loop, &default_ctx.tw);
} }

Loading…
Cancel
Save