stream: reject pull on signal abort during flush · nodejs/node@a9dc50d · GitHub
Skip to content

Commit a9dc50d

Browse files
trivikraduh95
authored andcommitted
stream: reject pull on signal abort during flush
An asynchronous transform can abort the pipeline while its final flush resolves to null. With no final batch yielded, the pipeline previously completed without observing the abort. Check the signal after transform iteration completes so the consumer rejects with the abort reason. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: #65346 Fixes: #65345 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 32bb197 commit a9dc50d

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

lib/internal/streams/iter/pull.js

Lines changed: 4 additions & 0 deletions

test/parallel/test-stream-iter-pull-async.js

Lines changed: 18 additions & 0 deletions

0 commit comments

Comments
 (0)