mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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: https://github.com/nodejs/node/pull/27125 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
committed by
Ruben Bridgewater
parent
2a51ae424a
commit
1a67c9948c
@@ -521,11 +521,7 @@ function onEofChunk(stream, state) {
|
||||
state.emittedReadable = true;
|
||||
// We have to emit readable now that we are EOF. Modules
|
||||
// in the ecosystem (e.g. dicer) rely on this event being sync.
|
||||
if (state.ended) {
|
||||
emitReadable_(stream);
|
||||
} else {
|
||||
process.nextTick(emitReadable_, stream);
|
||||
}
|
||||
emitReadable_(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user