Skip to content

Commit

Permalink
stream: remove dead code
Browse files Browse the repository at this point in the history
This condition could never be met because all calling functions
guarded against this.

PR-URL: #15665
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
BridgeAR committed Oct 1, 2017
1 parent 9910860 commit 4536128
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1040,11 +1040,6 @@ function copyFromBuffer(n, list) {
function endReadable(stream) {
var state = stream._readableState;

// If we get here before consuming all the bytes, then that is a
// bug in node. Should never happen.
if (state.length > 0)
throw new Error('"endReadable()" called on non-empty stream');

if (!state.endEmitted) {
state.ended = true;
process.nextTick(endReadableNT, state, stream);
Expand Down

0 comments on commit 4536128

Please sign in to comment.