dns: fix `resolve` failed starts without network
Fix the bug that you start process without network at first, but it connected lately, `dns.resolve` will stay failed with ECONNREFUSED because c-ares servers fallback to 127.0.0.1 at the very beginning. If c-ares servers "127.0.0.1" is detected and its not set by user self, and last query is not OK, recreating `ares_channel` operation will be triggered to reload servers. Fixes: https://github.com/nodejs/node/issues/1644 PR-URL: https://github.com/nodejs/node/pull/13076 Reviewed-By:Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
parent
595e5e3b
Please register or sign in to comment