Closed
Description
- Version:
14.11.0
- Platform:
Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux
- Subsystem:
stream
What steps will reproduce the bug?
const {Stream: LegacyStream, PassThrough} = require('stream');
const destination = new PassThrough();
destination.once('error', () => {});
const stream = new LegacyStream();
stream.pipe(destination);
destination.destroy(new Error('this should be handled'));
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
No error.
What do you see instead?
internal/streams/legacy.js:61
throw er; // Unhandled stream error in pipe.
^
Error: this should be handled
at Object.<anonymous> (/home/szm/Desktop/got/demo.js:9:21)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
Additional information
Metadata
Metadata
Assignees
Labels
No labels