Unverified Commit 35887306 authored by XadillaX's avatar XadillaX Committed by Gibson Fahnestock
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.

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


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
parent 1331a2a5
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