diff options
-rw-r--r-- | src/bun.js/webcore/streams.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/webcore/streams.zig b/src/bun.js/webcore/streams.zig index 771bf0cbf..b5b863e6a 100644 --- a/src/bun.js/webcore/streams.zig +++ b/src/bun.js/webcore/streams.zig @@ -3633,6 +3633,10 @@ pub const FIFO = struct { return; } + if (this.buf.len == 0 and available_to_read != 0) { + return; + } + const read_result = this.read(this.buf, available_to_read); if (read_result == .read and read_result.read.len == 0) { if (this.poll_ref != null) |