summaryrefslogtreecommitdiff
path: root/ext/net/01_net.js
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-10-16 20:56:57 -0700
committerGitHub <noreply@github.com>2024-10-17 03:56:57 +0000
commita61ba3c6995bef58f508a34e537932284692c294 (patch)
tree75e3e3dbba7b648ef6787da8e1f4989286d4583d /ext/net/01_net.js
parent167f674c7cbb9632000c1feb0b747ba098b01c12 (diff)
fix(net): don't try to set nodelay on upgrade streams (#26342)
Fixes https://github.com/denoland/deno/issues/26341. We try to call `op_set_nodelay` on an `UpgradeStream`, which doesn't support that operation.
Diffstat (limited to 'ext/net/01_net.js')
-rw-r--r--ext/net/01_net.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js
index 5b894947e..c3e5f9e5c 100644
--- a/ext/net/01_net.js
+++ b/ext/net/01_net.js
@@ -194,6 +194,20 @@ class Conn {
}
}
+class UpgradedConn extends Conn {
+ #rid = 0;
+
+ constructor(rid, remoteAddr, localAddr) {
+ super(rid, remoteAddr, localAddr);
+ ObjectDefineProperty(this, internalRidSymbol, {
+ __proto__: null,
+ enumerable: false,
+ value: rid,
+ });
+ this.#rid = rid;
+ }
+}
+
class TcpConn extends Conn {
#rid = 0;
@@ -601,5 +615,6 @@ export {
resolveDns,
TcpConn,
UnixConn,
+ UpgradedConn,
validatePort,
};