From 22859367ca05ff88e31320fa686375c48b42be5e Mon Sep 17 00:00:00 2001 From: Chetan Karande Date: Mon, 26 Aug 2019 10:02:44 -0400 Subject: [PATCH] child_process: remove unnecessary use of inner state PR-URL: https://github.com/nodejs/node/pull/29358 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- lib/internal/child_process.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index b07a38d6f6f5ac..e8a6e64215abda 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -300,9 +300,7 @@ function flushStdio(subprocess) { // TODO(addaleax): This doesn't necessarily account for all the ways in // which data can be read from a stream, e.g. being consumed on the // native layer directly as a StreamBase. - if (!stream || !stream.readable || - stream._readableState.readableListening || - stream[kIsUsedAsStdio]) { + if (!stream || !stream.readable || stream[kIsUsedAsStdio]) { continue; } stream.resume();