Skip to content

dns: fix `uv_timer_start` usage

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

Merge request reports

Loading