stream: remove dead code

This condition could never be met because all calling functions
guarded against this.

PR-URL: https://github.com/nodejs/node/pull/15665
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Ruben Bridgewater 2017-09-28 17:47:21 -03:00
parent 9910860a93
commit 4536128e7c
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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);