mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
net: remove ADDRCONFIG DNS hint on Windows
On Windows setting ADDRCONFIG causes localhost resolution to fail if there are no network connections. This removes that flag on Windows. Fixes: https://github.com/nodejs/node/issues/17641 PR-URL: https://github.com/nodejs/node/pull/17662 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
1 parent
dd14004eed
commit
74a5bbaff4
1 file changed
+4
-1
+4
-1
@@ -1080,7 +1080,10 @@ function lookupAndConnect(self, options) {
|
||||
hints: options.hints || 0
|
||||
};
|
||||
|
||||
if (dnsopts.family !== 4 && dnsopts.family !== 6 && dnsopts.hints === 0) {
|
||||
if (process.platform !== 'win32' &&
|
||||
dnsopts.family !== 4 &&
|
||||
dnsopts.family !== 6 &&
|
||||
dnsopts.hints === 0) {
|
||||
dnsopts.hints = dns.ADDRCONFIG;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user