From 25bebae61ce9f079f86325b54dbe1ac6dd296f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=88=9A?= Date: Sat, 20 Jan 2018 08:19:05 +0800 Subject: [PATCH] stream: simplify `src._readableState` to `state` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/18264 Reviewed-By: Weijia Wang Reviewed-By: Luigi Pinca Reviewed-By: Michaƫl Zasso Reviewed-By: Matteo Collina --- lib/_stream_readable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 21598efa65f254..500071203b0f3b 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -652,8 +652,8 @@ Readable.prototype.pipe = function(dest, pipeOpts) { if (((state.pipesCount === 1 && state.pipes === dest) || (state.pipesCount > 1 && state.pipes.indexOf(dest) !== -1)) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; increasedAwaitDrain = true; } src.pause();