From 4126a6e4c98f716c55dc10170663b9be4eb244ac Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:53:40 +0300 Subject: [PATCH] benchmark: fix webstream pipe-to PR-URL: https://github.com/nodejs/node/pull/49552 Reviewed-By: Robert Nagy Reviewed-By: Chemi Atlow --- benchmark/webstreams/pipe-to.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/webstreams/pipe-to.js b/benchmark/webstreams/pipe-to.js index 2b765bf2051569..a849cea0124749 100644 --- a/benchmark/webstreams/pipe-to.js +++ b/benchmark/webstreams/pipe-to.js @@ -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();