child_process: remove redundant condition
authorVladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
Mon, 19 Jan 2015 15:48:56 +0000 (18:48 +0300)
committerVladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
Sat, 24 Jan 2015 21:53:04 +0000 (00:53 +0300)
There is no need to check `flowing` since `resume` does
nothing when `flowing` is already true.

PR-URL: https://github.com/iojs/io.js/pull/511
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
lib/child_process.js

index ae569a2..0d73beb 100644 (file)
@@ -1057,8 +1057,7 @@ util.inherits(ChildProcess, EventEmitter);
 function flushStdio(subprocess) {
   if (subprocess.stdio == null) return;
   subprocess.stdio.forEach(function(stream, fd, stdio) {
-    if (!stream || !stream.readable || stream._consuming ||
-        stream._readableState.flowing)
+    if (!stream || !stream.readable || stream._consuming)
       return;
     stream.resume();
   });