Skip to content

Commit 0600ad4

Browse files
committed
doc: clarify setServer method
Added a note that that clarifies the fact that setServer does not check subsequent servers when the first one produces a NOTFOUND error.
1 parent 7edd0a1 commit 0600ad4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/dns.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,8 @@ An error will be thrown if an invalid address is provided.
10101010
The `dnsPromises.setServers()` method must not be called while a DNS query is in
10111011
progress.
10121012

1013+
Note that this method works much like [resolve.conf in Linux](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.
1014+
10131015
## Error codes
10141016

10151017
Each DNS query can return one of the following error codes:

0 commit comments

Comments
 (0)