From f9c16b87eff60858efa0b6977fa1d253be538589 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 e62583674026be..6438e6b650b814 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -301,9 +301,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();