Skip to content

Commit 1a67c99

Browse files
marcosc90BridgeAR
authored andcommitted
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. PR-URL: #27125 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 2a51ae4 commit 1a67c99

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/_stream_readable.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,7 @@ function onEofChunk(stream, state) {
521521
state.emittedReadable = true;
522522
// We have to emit readable now that we are EOF. Modules
523523
// in the ecosystem (e.g. dicer) rely on this event being sync.
524-
if (state.ended) {
525-
emitReadable_(stream);
526-
} else {
527-
process.nextTick(emitReadable_, stream);
528-
}
524+
emitReadable_(stream);
529525
}
530526
}
531527

0 commit comments

Comments
 (0)