### Version main ### Platform ```text macOS 26.5.2 ``` ### Subsystem stream ### What steps will reproduce the bug? ```js import { broadcast } from 'node:stream/iter'; const { writer, broadcast: channel } = broadcast({ budget: 16_384, backpressure: 'strict', }); const readable = channel.push(); let accepted = 0; while (accepted < 100_000 && writer.writevSync([])) accepted++; console.log({ accepted, canWrite: writer.canWrite }); await writer.end(); let entries = 0; for await (const _ of readable) entries++; console.log({ entries }); ``` ### How often does it reproduce? Is there a required condition? Always ### What is the expected behavior? Why is that the expected behavior? ```console { accepted: 100000, canWrite: true } { entries: 0 } ``` Zero-byte writes should be accepted as no-ops and create no buffer entries, preventing unbounded growth. From specification [§13.1.2 Broadcast backpressure](https://stream-iter.jasnell.me/#broadcast-backpressure) > The shared buffer cannot overwrite entries that the slowest consumer has not yet read. ### What do you see instead? ```console { accepted: 100000, canWrite: true } { entries: 100000 } ``` All 100,000 empty batches are buffered. ### Additional information _No response_
Activity
stream: skip zero-byte broadcast writes
stream: skip zero-byte broadcast writes
stream: skip zero-byte broadcast writes
stream: skip zero-byte broadcast writes
stream: skip zero-byte broadcast writes
stream: skip zero-byte broadcast writes