diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-10-16 20:56:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 03:56:57 +0000 |
commit | a61ba3c6995bef58f508a34e537932284692c294 (patch) | |
tree | 75e3e3dbba7b648ef6787da8e1f4989286d4583d /ext/http | |
parent | 167f674c7cbb9632000c1feb0b747ba098b01c12 (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/http')
-rw-r--r-- | ext/http/00_serve.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index 3b9b085a2..1b70cf212 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -76,7 +76,11 @@ import { ReadableStreamPrototype, resourceForReadableStream, } from "ext:deno_web/06_streams.js"; -import { listen, listenOptionApiName, TcpConn } from "ext:deno_net/01_net.js"; +import { + listen, + listenOptionApiName, + UpgradedConn, +} from "ext:deno_net/01_net.js"; import { hasTlsKeyPairOptions, listenTls } from "ext:deno_net/02_tls.js"; import { SymbolAsyncDispose } from "ext:deno_web/00_infra.js"; @@ -189,7 +193,7 @@ class InnerRequest { const upgradeRid = op_http_upgrade_raw(external); - const conn = new TcpConn( + const conn = new UpgradedConn( upgradeRid, underlyingConn?.remoteAddr, underlyingConn?.localAddr, |