Skip to content

Commit 38a92c9

Browse files
committed
remove duplicate resume
1 parent d65edcc commit 38a92c9

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/statement/stream/serverSideStream.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,6 @@ export class ServerSideStream extends Readable {
155155
const row = this.pendingRows.shift();
156156
const canContinue = this.push(row);
157157

158-
// If pending rows dropped below threshold, resume the source stream
159-
if (
160-
this.pendingRows.length <= this.maxPendingRows / 4 &&
161-
this.sourceStream &&
162-
this.inputPaused
163-
) {
164-
this.sourceStream.resume();
165-
this.inputPaused = false;
166-
}
167-
168158
// If push returns false, stop pushing and wait for _read to be called
169159
if (!canContinue) {
170160
this.processingData = false;
@@ -192,7 +182,7 @@ export class ServerSideStream extends Readable {
192182
if (
193183
this.sourceStream &&
194184
this.inputPaused &&
195-
this.pendingRows.length < this.maxPendingRows / 2
185+
this.pendingRows.length < this.maxPendingRows / 4
196186
) {
197187
this.sourceStream.resume();
198188
this.inputPaused = false;

0 commit comments

Comments
 (0)