summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/net.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/net.ts')
-rw-r--r--ext/node/polyfills/net.ts24
1 files changed, 7 insertions, 17 deletions
diff --git a/ext/node/polyfills/net.ts b/ext/node/polyfills/net.ts
index 48e1d0de8..35d273be9 100644
--- a/ext/node/polyfills/net.ts
+++ b/ext/node/polyfills/net.ts
@@ -1871,23 +1871,13 @@ function _setupListenHandle(
// Try to bind to the unspecified IPv6 address, see if IPv6 is available
if (!address && typeof fd !== "number") {
- // 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 (isWindows) {
+ address = DEFAULT_IPV4_ADDR;
+ addressType = 4;
+ } else {
+ address = DEFAULT_IPV6_ADDR;
+ addressType = 6;
+ }
}
if (rval === null) {