2 Commits

Author SHA1 Message Date
Rich Trott
6d937c01b0 test: replace Google servers with localhost
Replace Google DNS servers with 127.0.0.1 in
test-dns-setserver-when-querying.

Refs: https://github.com/nodejs/node/issues/25664

PR-URL: https://github.com/nodejs/node/pull/25694
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-27 09:12:09 -08:00
XadillaX
b3678dff52
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: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-06 04:22:31 +01:00