diff options
Diffstat (limited to 'src/bun.js/api/server.zig')
-rw-r--r-- | src/bun.js/api/server.zig | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index e35759245..0e39a23f2 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -1436,16 +1436,13 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp // this request was already finalized if (this.sink) |wrapper| { wrapper.sink.abort(); - this.markComplete(); - this.deinit(); + this.finalize(); return; } // if we can, free the request now. if (this.isDeadRequest()) { - this.finalizeWithoutDeinit(); - this.markComplete(); - this.deinit(); + this.finalize(); return; } @@ -2110,8 +2107,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp // } this.setAbortHandler(); - streamLog("is in progress, but did not return a Promise. Finalizing request context", .{}); - this.finalizeWithoutDeinit(); + streamLog("is in progress, but did not return a Promise", .{}); stream.value.unprotect(); } |