From 5680bd62a7b68a37cb5f3d2a229dec60e0a710ef Mon Sep 17 00:00:00 2001 From: Luan Devecchi Date: Sat, 31 Jul 2021 18:25:55 -0300 Subject: [PATCH 1/3] dns: add "tries" option to Resolve options --- 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 45b2ff79e37442..56f1522dd2f98a 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()`