diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-07-19 01:30:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 01:30:19 +0200 |
commit | bf4e99cbd77087706e7ea7034bd90079c2218e2b (patch) | |
tree | be4a6498095c635aef2d04a90abefd9a36cb775a /ext/node | |
parent | cfb9478a43379d7c1dcd5556e7f99a6b0861f486 (diff) |
fix(node/http): call callback after request is sent (#19871)
Fixes #19762
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/polyfills/http.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index 391906c40..17ab8ce31 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -629,14 +629,13 @@ class ClientRequest extends OutgoingMessage { core.tryClose(this._bodyWriteRid); } - - try { - cb?.(); - } catch (_) { - // - } })(), ]); + try { + cb?.(); + } catch (_) { + // + } if (this._timeout) { this._timeout.removeEventListener("abort", this._timeoutCb); webClearTimeout(this._timeout[timerId]); |