From a61ba3c6995bef58f508a34e537932284692c294 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Wed, 16 Oct 2024 20:56:57 -0700 Subject: 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. --- ext/net/01_net.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ext/net/01_net.js') 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, }; -- cgit v1.2.3