Skip to content

Commit

Permalink
fixup: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Mar 3, 2020
1 parent efd93fb commit f050b72
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/internal/streams/end-of-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ function eos(stream, opts, callback) {
};

const onclose = () => {
let err;
if (readable && !readableEnded) {
if (!isReadableEnded(stream))
return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
Expand All @@ -96,7 +95,7 @@ function eos(stream, opts, callback) {
if (!isWritableFinished(stream))
return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
}
callback.call(stream, err);
callback.call(stream);
};

const onrequest = () => {
Expand Down

0 comments on commit f050b72

Please sign in to comment.