From 7bf29b52b3c54a071b814ccf77cfaf275279136f 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 2b765bf2051..a849cea0124 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();