Skip to content

stream: observe abort while awaiting pipeTo source#64015

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-pipeto-abort-signal
Open

stream: observe abort while awaiting pipeTo source#64015
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-pipeto-abort-signal

Conversation

@trivikr

@trivikr trivikr commented Jun 20, 2026

Copy link
Copy Markdown
Member

Fixes: #64014

stream/iter's pipeTo() already checks the abort signal after receiving
source batches, but the no-transform path did not observe aborts while waiting
for the next source chunk.

This updates that path to use the existing abort-aware iterator wrapper so
pipeTo() rejects promptly when the signal aborts, even if the source
next() call is still pending.


Assisted-by: openai:gpt-5.5

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels Jun 20, 2026
@trivikr trivikr force-pushed the stream-iter-pipeto-abort-signal branch from cc8071c to 7d69188 Compare June 20, 2026 01:36
Use the abort-aware iterator wrapper in the no-transform pipeTo()
path so a pending source read does not block AbortSignal handling.

Fixes: nodejs#64014

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@trivikr trivikr force-pushed the stream-iter-pipeto-abort-signal branch from 7d69188 to e2918ed Compare June 20, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream/iter pipeTo() does not observe abort while waiting for the next source chunk

2 participants