Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ext/node): don't wait for end() call to send http client request #24390

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
satyarohith committed Jul 2, 2024
commit df67075cf75215ebddb36dd4916f68ffa18564c3
10 changes: 5 additions & 5 deletions ext/node/polyfills/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 630,6 @@ class ClientRequest extends OutgoingMessage {
if (this._req.cancelHandleRid !== null) {
core.tryClose(this._req.cancelHandleRid);
}
try {
cb?.();
} catch (_) {
//
}
if (this._timeout) {
this._timeout.removeEventListener("abort", this._timeoutCb);
webClearTimeout(this._timeout[timerId]);
Expand Down Expand Up @@ -786,6 781,11 @@ class ClientRequest extends OutgoingMessage {
this._send("", "latin1");
}
this._bodyWriter?.close();
try {
cb?.();
} catch (_) {
//
}
}

abort() {
Expand Down