Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ function ReadStream(path, options) {
options.highWaterMark = 64 * 1024;

// For backwards compat do not emit close on destroy.
options.emitClose = false;
if (options.emitClose === undefined) {
options.emitClose = false;
}

Readable.call(this, options);

Expand Down Expand Up @@ -241,7 +243,9 @@ function WriteStream(path, options) {
options = copyObject(getOptions(options, {}));

// For backwards compat do not emit close on destroy.
options.emitClose = false;
if (options.emitClose === undefined) {
options.emitClose = false;
}

Writable.call(this, options);

Expand Down