Skip to content

Commit

Permalink
doc: clarify setServers() methods in dns.md
Browse files Browse the repository at this point in the history
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: #21469
Refs: #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>
  • Loading branch information
Shivang44 authored and targos committed Jun 26, 2018
1 parent 4647f61 commit f5fc412
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f5fc412

Please sign in to comment.