diff options
author | Shivang Saxena <shivangs44@gmail.com> | 2018-06-22 20:37:15 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-06-25 21:03:21 +0300 |
commit | 95205a61251aca0af3f1c8663caaffb03a5f5c3a (patch) | |
tree | 912fba3c91d8fbe2ef0cc11c50662cee045af33a /doc/api/dns.md | |
parent | 813241316628679a502e6955375838bd506791e8 (diff) |
doc: clarify setServers() methods in dns.md
Added a note that that clarifies the fact that setServers() does not
check subsequent servers when the first one produces a NOTFOUND error.
PR-URL: https://github.com/nodejs/node/pull/21469
Refs: https://github.com/nodejs/node/issues/21391
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/dns.md')
-rw-r--r-- | doc/api/dns.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md index 921c097a9a9..804c39e3a3c 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -568,6 +568,13 @@ An error will be thrown if an invalid address is provided. The `dns.setServers()` method must not be called while a DNS query is in progress. +Note that this method works much like +[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html). +That is, if attempting to resolve with the first server provided results in a +`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with +subsequent servers provided. Fallback DNS servers will only be used if the +earlier ones time out or result in some other error. + ## DNS Promises API > Stability: 1 - Experimental @@ -1010,6 +1017,13 @@ An error will be thrown if an invalid address is provided. The `dnsPromises.setServers()` method must not be called while a DNS query is in progress. +Note that this method works much like +[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html). +That is, if attempting to resolve with the first server provided results in a +`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with +subsequent servers provided. Fallback DNS servers will only be used if the +earlier ones time out or result in some other error. + ## Error codes Each DNS query can return one of the following error codes: |