Skip to content

Commit f40ac32

Browse files
theanarkhtargos
authored andcommitted
dns: set timeout to 1000ms when timeout < 0
PR-URL: #58441 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3a119be commit f40ac32

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cares_wrap.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,7 @@ void ChannelWrap::StartTimer() {
902902
return;
903903
}
904904
int timeout = timeout_;
905-
if (timeout == 0) timeout = 1;
906-
if (timeout < 0 || timeout > 1000) timeout = 1000;
905+
if (timeout <= 0 || timeout > 1000) timeout = 1000;
907906
uv_timer_start(timer_handle_, AresTimeout, timeout, timeout);
908907
}
909908

0 commit comments

Comments
 (0)