From ac48476aa6bda189c5dd49fd1d2534fc6c2db6e8 Mon Sep 17 00:00:00 2001 From: cirospaciari Date: Thu, 7 Sep 2023 18:11:21 -0400 Subject: revert abortListener --- src/bun.js/webcore/response.zig | 9 ++++----- 1 file 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); -- cgit v1.2.3