summaryrefslogtreecommitdiff
path: root/lib/tty.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-09-24 11:15:37 +0200
committerAnna Henningsen <anna@addaleax.net>2018-10-04 09:20:21 -0700
commitc7405fe9cb91124d966235467d6a9148e6bc9bd5 (patch)
treef3970760ddb2b92a7a3999437f7460221cbf5bf8 /lib/tty.js
parent17a0cd2bab405bbaaf890aa52043b273d61db3d8 (diff)
downloadandroid-node-v8-c7405fe9cb91124d966235467d6a9148e6bc9bd5.tar.gz
android-node-v8-c7405fe9cb91124d966235467d6a9148e6bc9bd5.tar.bz2
android-node-v8-c7405fe9cb91124d966235467d6a9148e6bc9bd5.zip
Revert "tty: make _read throw ERR_TTY_WRITABLE_NOT_READABLE"
This reverts commit 91eec00ca20a54b1dc010cfc2fb34bc2f39eab6b. Refs: https://github.com/nodejs/node/pull/21654 Refs: https://github.com/nodejs/node/issues/21203 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/tty.js')
-rw-r--r--lib/tty.js13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/tty.js b/lib/tty.js
index 83e00df110..62945a78eb 100644
--- a/lib/tty.js
+++ b/lib/tty.js
@@ -25,11 +25,7 @@ const { inherits, _extend } = require('util');
const net = require('net');
const { TTY, isTTY } = internalBinding('tty_wrap');
const errors = require('internal/errors');
-const {
- ERR_INVALID_FD,
- ERR_TTY_INIT_FAILED,
- ERR_TTY_WRITABLE_NOT_READABLE
-} = errors.codes;
+const { ERR_INVALID_FD, ERR_TTY_INIT_FAILED } = errors.codes;
const { getColorDepth } = require('internal/tty');
// Lazy loaded for startup performance.
@@ -131,13 +127,6 @@ WriteStream.prototype._refreshSize = function() {
}
};
-// A WriteStream is not readable from, so _read become a no-op.
-// this method could still be called because net.Socket()
-// is a duplex
-WriteStream.prototype._read = function() {
- this.destroy(new ERR_TTY_WRITABLE_NOT_READABLE());
-};
-
// Backwards-compat
WriteStream.prototype.cursorTo = function(x, y) {
if (readline === undefined) readline = require('readline');