Version
v16.13.0
Platform
Linux david-Latitude-E6440 5.13.0-21-generic #21-Ubuntu SMP Tue Oct 19 08:59:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
stream
What steps will reproduce the bug?
const{ PassThrough }=require('stream');constpt=newPassThrough({highWaterMark: 0});pt.on('drain',()=>console.log('drained'));console.log(pt.write('hello'));console.log(pt.writableLength,pt.writableNeedDrain);console.log(pt.read().toString());console.log(pt.writableLength,pt.writableNeedDrain);How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
On Node 14:
david@david-Latitude-E6440:/tmp$ node --version
v14.18.1
david@david-Latitude-E6440:/tmp$ node repro.js false
5 true
drained
hello
0 false
What do you see instead?
On Node 16:
david@david-Latitude-E6440:/tmp$ node --version
v16.13.0
david@david-Latitude-E6440:/tmp$ node repro.js false
5 true
hello
5 true
Additional information
No response
Version
v16.13.0
Platform
Linux david-Latitude-E6440 5.13.0-21-generic #21-Ubuntu SMP Tue Oct 19 08:59:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
stream
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
On Node 14:
What do you see instead?
On Node 16:
Additional information
No response