-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: clarify setServer method #21469
Conversation
Added a note that that clarifies the fact that setServer does not check subsequent servers when the first one produces a NOTFOUND error.
@Shivang44 hi, Thank you. |
doc/api/dns.md
Outdated
@@ -1010,6 +1010,8 @@ 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 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: line wrap at <= 80 chars
This only addresses |
Lint was failing because doc was not under 80 lines.
doc/api/dns.md
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: `resolve`
-> `resolve()`
?
(see STYLE_GUIDE.md about references to methods format)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, did not see that.
Added note about setServers in dnsPromises to dns as well.
Updated methods in doc to include parentheses.
Thanks for all the feedback everyone. I updated to reflect all current comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc format LGTM.
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 <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 95205a6 |
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 <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
Added a note that that clarifies the fact that setServer does not
check subsequent servers when the first one produces a NOTFOUND
error.
Refs: #21391