Unverified Commit b3678dff authored by XadillaX's avatar XadillaX Committed by Anna Henningsen
Browse files

dns: fix crash while setting server during query

Fix this issue follow these two points:

1. Keep track of how many queries are currently open. If `setServers()`
   is called while there are open queries, error out.
2. For `Resolver` instances, use option 1. For dns.setServers(), just
   create a fresh new default channel every time it is called, and then
   set its servers list.

PR-URL: https://github.com/nodejs/node/pull/14891
Fixes: https://github.com/nodejs/node/issues/14734


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
parent b3e53673
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment