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: https://github.com/iojs/io.js/issues/1068 PR-URL: https://github.com/iojs/io.js/pull/1233 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
This commit is contained in:
Родитель
999fbe9d96
Коммит
9ae1a61214
|
@ -630,6 +630,8 @@
|
|||
writable: false
|
||||
});
|
||||
}
|
||||
// Make sure the stdin can't be `.end()`-ed
|
||||
stdin._writableState.ended = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Загрузка…
Ссылка в новой задаче