From c7e918b06a265ddaf0f5e89eceb6f52961f966ef Mon Sep 17 00:00:00 2001 From: Luan Devecchi Date: Sat, 31 Jul 2021 18:25:55 -0300 Subject: [PATCH] dns: add "tries" option to Resolve options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/39610 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso --- doc/api/dns.md | 2 ++ lib/internal/dns/promises.js | 4 +++- lib/internal/dns/utils.js | 10 +++++++++- src/cares_wrap.cc | 19 ++++++++++++++----- src/cares_wrap.h | 7 ++++++- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index 52aa4b846032e7..bb234e123d19ad 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -108,6 +108,8 @@ Create a new resolver. * `options` {Object} * `timeout` {integer} Query timeout in milliseconds, or `-1` to use the default timeout. + * `tries` {integer} The number of tries the resolver will try contacting + each name server before giving up, `4` by default. ### `resolver.cancel()`