Skip to content

Commit

Permalink
fix(node): refer the internal rid correctly (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyannyacha authored Jun 19, 2024
1 parent c0bc1dc commit 88f8b77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/node/polyfills/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ import { clearTimeout as webClearTimeout } from "ext:deno_web/02_timers.js";
import { resourceForReadableStream } from "ext:deno_web/06_streams.js";
import { TcpConn } from "ext:deno_net/01_net.js";

const { internalRidSymbol } = core;

enum STATUS_CODES {
/** RFC 7231, 6.2.1 */
Continue = 100,
Expand Down Expand Up @@ -617,7 +619,7 @@ class ClientRequest extends OutgoingMessage {
this.method,
url,
headers,
client.rid,
client[internalRidSymbol],
this._bodyWriteRid,
);
}
Expand Down Expand Up @@ -803,7 +805,7 @@ class ClientRequest extends OutgoingMessage {
}
this.destroyed = true;

const rid = this._client?.rid;
const rid = this._client?.[internalRidSymbol];
if (rid) {
core.tryClose(rid);
}
Expand Down

0 comments on commit 88f8b77

Please sign in to comment.