From d68f44d604f52ad9b4b9052d42d93ffb10f83af7 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Thu, 24 Nov 2022 03:54:32 -0800 Subject: Don't pre-maturely close the input buffer --- src/bun.js/webcore/streams.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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) -- cgit v1.2.3