aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar cirospaciari <ciro.spaciari@gmail.com> 2023-09-07 18:11:21 -0400
committerGravatar cirospaciari <ciro.spaciari@gmail.com> 2023-09-07 18:11:21 -0400
commitac48476aa6bda189c5dd49fd1d2534fc6c2db6e8 (patch)
treec1c7804ae5a71c64e6e284c315a8c27addb19424
parenta5a4d51788bcfcbfb21bdfb6dbff54c1aea3325d (diff)
downloadbun-ciro/queue-response-experiment.tar.gz
bun-ciro/queue-response-experiment.tar.zst
bun-ciro/queue-response-experiment.zip
revert abortListenerciro/queue-response-experiment
-rw-r--r--src/bun.js/webcore/response.zig9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/bun.js/webcore/response.zig b/src/bun.js/webcore/response.zig
index 52a02fa70..77104c3d5 100644
--- a/src/bun.js/webcore/response.zig
+++ b/src/bun.js/webcore/response.zig
@@ -1378,13 +1378,12 @@ pub const Fetch = struct {
return fetch_tasklet;
}
- pub fn abortListener(this: *FetchTasklet, err: JSValue) void {
+ pub fn abortListener(this: *FetchTasklet, reason: JSValue) void {
log("abortListener", .{});
const globalThis = this.global_this;
- err.ensureStillAlive();
- err.protect();
- this.is_waiting_abort = true;
- this.abort_reason = err;
+ reason.ensureStillAlive();
+ reason.protect();
+ this.abort_reason = reason;
this.signal_store.aborted.store(true, .Monotonic);
this.tracker.didCancel(globalThis);