-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Version: 14.12.0
- Platform:
Linux SZM-DESKTOP 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: stream
What steps will reproduce the bug?
const {pipeline, Duplex, PassThrough} = require('stream');
const a = new PassThrough();
a.end('foobar');
const b = new Duplex({
write(chunk, encoding, callback) {
callback();
}
});
pipeline(a, b, error => {
if (error) {
throw error;
}
console.log(b.listenerCount('error'));
setTimeout(() => {
console.log(b.listenerCount('error'));
b.destroy(new Error('no way'));
}, 100);
});
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
0
0
[Uncaught] Error: no way
What do you see instead?
2
1
/cc @ronag
sindresorhus
Metadata
Metadata
Assignees
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.