mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
fix error when not locked but with readable available
This commit is contained in:
@@ -871,6 +871,15 @@ pub const Fetch = struct {
|
||||
if (!success) {
|
||||
const err = this.onReject(result);
|
||||
err.ensureStillAlive();
|
||||
if (this.readable_stream_ref.get()) |readable| {
|
||||
readable.ptr.Bytes.onData(
|
||||
.{
|
||||
.err = .{ .JSValue = err },
|
||||
},
|
||||
bun.default_allocator,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.response.get()) |response_js| {
|
||||
if (response_js.as(Response)) |response| {
|
||||
const body = response.body;
|
||||
|
||||
Reference in New Issue
Block a user