diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2024-10-30 02:41:16 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 18:41:16 +0100 |
commit | a69224ea5bd02f08108aac867c492754095f2d34 (patch) | |
tree | 253aad351353b0ff8f3e3fb57785a8de41aadcdf /ext/node/polyfills/net.ts | |
parent | 51978a76540cac72dd35528dd023c3fc6d5eeca6 (diff) |
Revert "fix(ext/node): fix dns.lookup result ordering (#26264)" (#26621)
This reverts commit d59599fc187c559ee231882773e1c5a2b932fc3d.
Closes #26588
Diffstat (limited to 'ext/node/polyfills/net.ts')
-rw-r--r-- | ext/node/polyfills/net.ts | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/ext/node/polyfills/net.ts b/ext/node/polyfills/net.ts index 35d273be9..48e1d0de8 100644 --- a/ext/node/polyfills/net.ts +++ b/ext/node/polyfills/net.ts @@ -1871,13 +1871,23 @@ function _setupListenHandle( // Try to bind to the unspecified IPv6 address, see if IPv6 is available if (!address && typeof fd !== "number") { - if (isWindows) { - address = DEFAULT_IPV4_ADDR; - addressType = 4; - } else { - address = DEFAULT_IPV6_ADDR; - addressType = 6; - } + // TODO(@bartlomieju): differs from Node which tries to bind to IPv6 first + // when no address is provided. + // + // Forcing IPv4 as a workaround for Deno not aligning with Node on + // implicit binding on Windows. + // + // REF: https://github.com/denoland/deno/issues/10762 + // rval = _createServerHandle(DEFAULT_IPV6_ADDR, port, 6, fd, flags); + + // if (typeof rval === "number") { + // rval = null; + address = DEFAULT_IPV4_ADDR; + addressType = 4; + // } else { + // address = DEFAULT_IPV6_ADDR; + // addressType = 6; + // } } if (rval === null) { |