-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Version: 12.18.0 and 14.4.0
- Platform: Ubuntu 20.04 LTS
- Subsystem:
I use the following code to test the callback of the pipeline() function under node 12.18.0 and node 14.4.0:
'use strict';
import {pipeline, Readable} from 'stream';
import {createWriteStream} from 'fs';
pipeline(
Readable.from(['a', 'b', 'c', '\r\n']),
process.stdout,
(err) => {
console.log('finish callback stdout');
}
);
pipeline(
Readable.from(['a', 'b', 'c', '\r\n']),
createWriteStream('outfile.txt'),
(err) => {
console.log('finish callback file write stream');
}
);
Under Node 12.18.0, the callback on the second pipeline() is called on completion, but the callback on the first is not.
Same problem on Node 14.4.0.
Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.