Skip to content
Merged
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
Prev Previous commit
revert formatting change
  • Loading branch information
gurgunday committed Apr 14, 2025
commit cd2662848d8577b1ef1f09cbe8f03284dea02502
6 changes: 4 additions & 2 deletions lib/internal/streams/end-of-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@ function eos(stream, options, callback) {

if (readable && !readableFinished && isReadableNodeStream(stream, true)) {
if (!isReadableFinished(stream, false))
return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
return callback.call(stream,
new ERR_STREAM_PREMATURE_CLOSE());
}
if (writable && !writableFinished) {
if (!isWritableFinished(stream, false))
return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
return callback.call(stream,
new ERR_STREAM_PREMATURE_CLOSE());
}

callback.call(stream);
Expand Down
Loading