Browse Source

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>
v1.8.0-commit
Fedor Indutny 10 years ago
parent
commit
9ae1a61214
  1. 2
      src/node.js

2
src/node.js

@ -630,6 +630,8 @@
writable: false
});
}
// Make sure the stdin can't be `.end()`-ed
stdin._writableState.ended = true;
break;
default:

Loading…
Cancel
Save