From 3b9c467d7ff17a24c1c4f1a0117d52dc20404e08 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 31 Aug 2018 06:20:36 +0200 Subject: [PATCH 1/2] 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. --- 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..3091c3ac3ed2a2 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_'); if (!state.destroyed && (state.length || state.ended)) { stream.emit('readable'); } From 991d79f84e038bbc1202da01a79063c9d0896393 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 3 Sep 2018 06:53:35 +0200 Subject: [PATCH 2/2] squash: add state values to debug statement --- 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 3091c3ac3ed2a2..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('emitReadable_'); + debug('emitReadable_', state.destroyed, state.length, state.ended); if (!state.destroyed && (state.length || state.ended)) { stream.emit('readable'); }