benchmark: fix webstream pipe-to

PR-URL: https://github.com/nodejs/node/pull/49552
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
pull/49542/head
Raz Luvaton 2023-09-08 15:53:40 +03:00 committed by GitHub
parent 3163f8d680
commit 7bf29b52b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ async function main({ n, highWaterMarkR, highWaterMarkW }) {
const rs = new ReadableStream({
highWaterMark: highWaterMarkR,
pull: function(controller) {
if (i++ === n) {
if (i++ < n) {
controller.enqueue(b);
} else {
controller.close();