node icon indicating copy to clipboard operation
node copied to clipboard

dns: fix `uv_timer_start` usage

Open oluan opened this issue 3 years ago • 4 comments

While implementing tests for new option tries on Resolver I noticed that it took at least 900ms more than it should when the timeout was > 1000.

So a 1000ms timeout would actually take ~1900ms to trigger.

The reason is that the wrapper would register a timer in which callback interval and timeout was 1000ms in this case, which caused the callback to fire only after this timeout, leading to one more interval of waiting to be fired again.

In addition, this also adds missing tests for the option tries!

Refs: https://github.com/nodejs/node/pull/39610 https://github.com/nodejs/node/issues/39562

oluan avatar Aug 10 '21 06:08 oluan

@nodejs/dns

Trott avatar Aug 10 '21 13:08 Trott

Any idea why the coverage-linux is failing?

nvm, just saw https://github.com/nodejs/node/pull/39725

oluan avatar Aug 10 '21 20:08 oluan

@nodejs/dns

addaleax avatar Aug 13 '21 16:08 addaleax

Ping @nodejs/dns for reviews

aduh95 avatar Sep 20 '23 08:09 aduh95