Version
main
Platform
Subsystem
stream
What steps will reproduce the bug?
import { broadcast } from 'node:stream/iter';
const { writer } = broadcast({
highWaterMark: 1,
backpressure: 'strict',
});
await writer.write('one');
const pending = writer.write('two');
try {
await writer.write('three');
} catch (error) {
console.log(error.name);
console.log(error instanceof RangeError);
}
writer.fail();
await pending.catch(() => {});
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
As per §7.2.2, Writer.write(), step 7.3
If "strict": if the pending writes queue is at capacity, return a promise rejected with a RangeError.
What do you see instead?
Additional information
No response
Version
main
Platform
Subsystem
stream
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
As per §7.2.2,
Writer.write(), step 7.3What do you see instead?
Additional information
No response