GeezerVison is showing github.com — doc: clarify setServers() methods in dns.md · nodejs/node@f5fc412
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/dns.md +14Lines changed: 14 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -568,6 +568,13 @@ An error will be thrown if an invalid address is provided. |
568 | 568 | The `dns.setServers()` method must not be called while a DNS query is in |
569 | 569 | progress. |
570 | 570 |
|
| 571 | +Note that this method works much like |
| 572 | +[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html). |
| 573 | +That is, if attempting to resolve with the first server provided results in a |
| 574 | +`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with |
| 575 | +subsequent servers provided. Fallback DNS servers will only be used if the |
| 576 | +earlier ones time out or result in some other error. |
| 577 | + |
571 | 578 | ## DNS Promises API |
572 | 579 |
|
573 | 580 | > Stability: 1 - Experimental |
@@ -1010,6 +1017,13 @@ An error will be thrown if an invalid address is provided. |
1010 | 1017 | The `dnsPromises.setServers()` method must not be called while a DNS query is in |
1011 | 1018 | progress. |
1012 | 1019 |
|
| 1020 | +Note that this method works much like |
| 1021 | +[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html). |
| 1022 | +That is, if attempting to resolve with the first server provided results in a |
| 1023 | +`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with |
| 1024 | +subsequent servers provided. Fallback DNS servers will only be used if the |
| 1025 | +earlier ones time out or result in some other error. |
| 1026 | + |
1013 | 1027 | ## Error codes |
1014 | 1028 |
|
1015 | 1029 | Each DNS query can return one of the following error codes: |
|