-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.stalledIssues and PRs that are stalled.Issues and PRs that are stalled.
Description
nodejs/node-v0.x-archive#9243 (comment) led me to realizing that the way dns.setServers
is implemented doesn't play too well with async code.
The current target server is stored in a per-app global state, which would probably be fine with sync code, but complicates things if you want to query multiple servers with our async resolve
.
I'd propose adding an options object to resolve
containing servers
, while deprecating dns.setServers
in a major version. I think having an option object on resolve
methods could prove useful later.
Note: I haven't checked if c-ares enables per-query target servers easily, maybe @indutny can comment on that part.
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.stalledIssues and PRs that are stalled.Issues and PRs that are stalled.