Skip to content

Commit

Permalink
stream: update emit readable debug statement
Browse files Browse the repository at this point in the history
Currently, the debug statement in emitReadable is `emit readable` which
can be interpreted as the readable event is going to be emitted. But
I think the intent of this debug statment is just that the
emitReadable_ function was entered. If that was not the intent then
perhaps the debug statment should be moved into the if statement below
it.

PR-URL: nodejs#22613
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
danbev committed Sep 3, 2018
1 parent d7d3bf5 commit 0e519b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ function emitReadable(stream) {

function emitReadable_(stream) {
var state = stream._readableState;
debug('emit readable');
debug('emitReadable_', state.destroyed, state.length, state.ended);
if (!state.destroyed && (state.length || state.ended)) {
stream.emit('readable');
}
Expand Down

0 comments on commit 0e519b4

Please sign in to comment.