Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream: remove dead code #27125

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
stream: remove dead code
Remove unreachable code. `state.ended` is always set to true
in this part of the code. The `else` clause can't be executed.
  • Loading branch information
marcosc90 committed Apr 7, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d9711ef9e33f8644a4cb19ebeae6a81d4c0e3fa2
6 changes: 1 addition & 5 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
@@ -521,11 +521,7 @@ function onEofChunk(stream, state) {
state.emittedReadable = true;
// We have to emit readable now that we are EOF. Modules
// in the ecosystem (e.g. dicer) rely on this event being sync.
if (state.ended) {
emitReadable_(stream);
} else {
process.nextTick(emitReadable_, stream);
}
emitReadable_(stream);
}
}