From 0e519b4f56cfea84c252ab86f91eece05344bef1 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 31 Aug 2018 06:20:36 +0200 Subject: [PATCH] stream: update emit readable debug statement 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: https://github.com/nodejs/node/pull/22613 Reviewed-By: Denys Otrishko Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina --- lib/_stream_readable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index f0829966438077..07e2c41beec21b 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -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'); }