Skip to content

Commit 1a25e88

Browse files
committed
dns: set timeout to 1000ms when timeout < 0
1 parent 6027371 commit 1a25e88

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)