stream: optimize pipeTo promise handling

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/63572
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Matteo Collina authored and Antoine du Hamel committed 2026-07-30 13:51:50 +02:00
1 parent a2b9095e03
commit 3d91aeb434
1 file changed
+1 -1
+1 -1
View File
@@ -1569,7 +1569,7 @@ function readableStreamPipeTo(
}
// Write the chunk - we're already in a separate microtask from enqueue
// because we awaited writer[kState].ready.promise above
// because we awaited writer[kState].ready.promise above.
state.currentWrite = writableStreamDefaultWriterWrite(writer, chunk);
setPromiseHandled(state.currentWrite);