The `error` event is not cleaned up on successful read
Closed this issue · 2 comments
szmarczak commented
const getStream = require('get-stream');
const {Readable} = require('stream');
const stream = new Readable({
read() {
this.push('chunk');
this.push(null);
}
});
const buffer = await getStream.buffer(stream);
console.log(stream.listenerCount('error')); // => 1
szmarczak commented
#21 should fix this nodejs/node#32995
szmarczak commented
wontfix