diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 1a0bc8902ac..a863b3c37d6 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -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);