Skip to content

Commit 7dbfeb5

Browse files
theanarkhmarco-ippolito
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 62975ff commit 7dbfeb5

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
@@ -747,8 +747,7 @@ void ChannelWrap::StartTimer() {
747747
return;
748748
}
749749
int timeout = timeout_;
750-
if (timeout == 0) timeout = 1;
751-
if (timeout < 0 || timeout > 1000) timeout = 1000;
750+
if (timeout <= 0 || timeout > 1000) timeout = 1000;
752751
uv_timer_start(timer_handle_, AresTimeout, timeout, timeout);
753752
}
754753

0 commit comments

Comments
 (0)