diff options
author | 2022-11-24 03:54:32 -0800 | |
---|---|---|
committer | 2022-11-24 03:54:32 -0800 | |
commit | d68f44d604f52ad9b4b9052d42d93ffb10f83af7 (patch) | |
tree | dc9231035e378424c9df459cdde7690bf977c868 | |
parent | ffacc1d02ddd7ecf3af7589c5af19d92ce85db75 (diff) | |
download | bun-d68f44d604f52ad9b4b9052d42d93ffb10f83af7.tar.gz bun-d68f44d604f52ad9b4b9052d42d93ffb10f83af7.tar.zst bun-d68f44d604f52ad9b4b9052d42d93ffb10f83af7.zip |
Don't pre-maturely close the input buffer
-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) |