Skip to content

Commit 88f8b77

Browse files
authored
fix(node): refer the internal rid correctly (#373)
1 parent c0bc1dc commit 88f8b77

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/node/polyfills/http.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ import { clearTimeout as webClearTimeout } from "ext:deno_web/02_timers.js";
6666
import { resourceForReadableStream } from "ext:deno_web/06_streams.js";
6767
import { TcpConn } from "ext:deno_net/01_net.js";
6868

69+
const { internalRidSymbol } = core;
70+
6971
enum STATUS_CODES {
7072
/** RFC 7231, 6.2.1 */
7173
Continue = 100,
@@ -617,7 +619,7 @@ class ClientRequest extends OutgoingMessage {
617619
this.method,
618620
url,
619621
headers,
620-
client.rid,
622+
client[internalRidSymbol],
621623
this._bodyWriteRid,
622624
);
623625
}
@@ -803,7 +805,7 @@ class ClientRequest extends OutgoingMessage {
803805
}
804806
this.destroyed = true;
805807

806-
const rid = this._client?.rid;
808+
const rid = this._client?.[internalRidSymbol];
807809
if (rid) {
808810
core.tryClose(rid);
809811
}

0 commit comments

Comments
 (0)