Skip to content

Commit 8da065a

Browse files
committed
fixup
1 parent db6a98e commit 8da065a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/_stream_readable.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ function Readable(options) {
213213
Stream.call(this, options);
214214

215215
destroyImpl.construct(this, () => {
216-
maybeReadMore(this, this._readableState);
216+
if (!this.isPaused()) {
217+
maybeReadMore(this, this._readableState);
218+
}
217219
});
218220
}
219221

@@ -633,7 +635,7 @@ function maybeReadMore_(stream, state) {
633635
// called push() with new data. In this case we skip performing more
634636
// read()s. The execution ends in this method again after the _read() ends
635637
// up calling push() with more data.
636-
while (!state.reading && !state.ended && state[kPaused] !== true &&
638+
while (!state.reading && !state.ended &&
637639
(state.length < state.highWaterMark ||
638640
(state.flowing && state.length === 0))) {
639641
const len = state.length;

0 commit comments

Comments
 (0)