nghttpx: Fix bug that DNS timeout was erroneously disabled
This commit is contained in:
parent
db3a5f9aef
commit
483e5f4e7b
|
@ -216,7 +216,9 @@ void DNSResolver::reset_timeout() {
|
|||
if (tv == nullptr) {
|
||||
return;
|
||||
}
|
||||
timer_.repeat = tv->tv_sec + tv->tv_usec / 1000000.;
|
||||
// To avoid that timer_.repeat becomes 0, which makes ev_timer_again
|
||||
// useless, add tiny fraction of time.
|
||||
timer_.repeat = tv->tv_sec + tv->tv_usec / 1000000. + 1e-9;
|
||||
ev_timer_again(loop_, &timer_);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue