Skip to content

Commit 9ae1a61

Browse files
committed
node: ensure that streams2 won't .end() stdin
Stdin is purely read-only stream. Although, `net.Socket` might be used to create it if stdin is in fact a Pipe or TCP socket, the `stream.Duplex` should not try to call `.end()` on it. Fix: #1068 PR-URL: #1233 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
1 parent 999fbe9 commit 9ae1a61

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/node.js

+2
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,8 @@
630630
writable: false
631631
});
632632
}
633+
// Make sure the stdin can't be `.end()`-ed
634+
stdin._writableState.ended = true;
633635
break;
634636

635637
default:

0 commit comments

Comments
 (0)