diff options
author | Anto Aravinth <anto.aravinth.cse@gmail.com> | 2019-05-19 14:54:07 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-05-20 00:37:51 +0300 |
commit | b4735ecebb390f467bba5b2d467f27f88dbbf09e (patch) | |
tree | 89f303d7efe1f14cf3857c735b552a7778d130ef /lib/internal/js_stream_socket.js | |
parent | be26f6e9d5e8f39048549fa4f18eef49adff3e55 (diff) |
stream: use readableObjectMode public api for js stream
PR-URL: https://github.com/nodejs/node/pull/27655
Refs: https://github.com/nodejs/node/issues/445
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'lib/internal/js_stream_socket.js')
-rw-r--r-- | lib/internal/js_stream_socket.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/js_stream_socket.js b/lib/internal/js_stream_socket.js index 7302c7a128e..ebe90cccc75 100644 --- a/lib/internal/js_stream_socket.js +++ b/lib/internal/js_stream_socket.js @@ -50,7 +50,7 @@ class JSStreamSocket extends Socket { stream.on('error', (err) => this.emit('error', err)); const ondata = (chunk) => { if (typeof chunk === 'string' || - stream._readableState.objectMode === true) { + stream.readableObjectMode === true) { // Make sure that no further `data` events will happen. stream.pause(); stream.removeListener('data', ondata); |