Skip to content

Commit 4536128

Browse files
committed
stream: remove dead code
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]>
1 parent 9910860 commit 4536128

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/_stream_readable.js

-5
Original file line numberDiff line numberDiff line change
@@ -1040,11 +1040,6 @@ function copyFromBuffer(n, list) {
10401040
function endReadable(stream) {
10411041
var state = stream._readableState;
10421042

1043-
// If we get here before consuming all the bytes, then that is a
1044-
// bug in node. Should never happen.
1045-
if (state.length > 0)
1046-
throw new Error('"endReadable()" called on non-empty stream');
1047-
10481043
if (!state.endEmitted) {
10491044
state.ended = true;
10501045
process.nextTick(endReadableNT, state, stream);

0 commit comments

Comments
 (0)