diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/node/polyfills/http.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index 1103e93c3..ae670d5f0 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -787,6 +787,13 @@ class ClientRequest extends OutgoingMessage { } this.destroyed = true; + const rid = this._client?.rid; + if (rid) { + core.tryClose(rid); + } + if (this._req.cancelHandleRid !== null) { + core.tryClose(this._req.cancelHandleRid); + } // If we're aborting, we don't care about any more response data. if (this.res) { this.res._dump(); |