-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Version: v13.13.0
- Platform: Linux solus 5.5.11-151.current deps: update openssl to 1.0.1j #1 SMP PREEMPT Tue Mar 24 18:06:46 UTC 2020 x86_64 GNU/Linux
- Subsystem: stream
What steps will reproduce the bug?
const {Readable} = require('stream');
async function getBuffer(readable) {
const chunks = [];
for await (const chunk of readable) {
chunks.push(chunk);
}
return Buffer.concat(chunks);
}
const stream = new Readable({
read() {
this.push('chunk');
this.push(null);
}
});
const buffer = await getBuffer(stream);
console.log(stream.listenerCount('error'));
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
0
What do you see instead?
1
Additional information
The error
handler seems to be from https://github.com/nodejs/node/blob/master/lib/internal/streams/end-of-stream.js
Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.