Title: stream/iter pipeTo() does not observe abort while waiting for the next source chunk · Issue #64014 · nodejs/node · GitHub
Open Graph Title: stream/iter pipeTo() does not observe abort while waiting for the next source chunk · Issue #64014 · nodejs/node
X Title: stream/iter pipeTo() does not observe abort while waiting for the next source chunk · Issue #64014 · nodejs/node
Description: Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { pipeTo } from "node:stream/iter"; import { setTimeout } from "node:timers/promises"; async function* neverYieldingSource() { await new Promis...
Open Graph Description: Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { pipeTo } from "node:stream/iter"; import { setTimeout } from "node:timers/promises"; async function* ...
X Description: Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { pipeTo } from "node:stream/iter"; import { setTimeout } from "node:timers/promises&quo...
Opengraph URL: https://github.com/nodejs/node/issues/64014
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream/iter pipeTo() does not observe abort while waiting for the next source chunk","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nmacOS 26.5.0\n```\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n```js\nimport { pipeTo } from \"node:stream/iter\";\nimport { setTimeout } from \"node:timers/promises\";\n\nasync function* neverYieldingSource() {\n await new Promise(() =\u003e {});\n}\n\nconst writer = {\n write() {},\n};\n\nconst ac = new AbortController();\n\nsetTimeout(100).then(() =\u003e {\n ac.abort(new Error(\"abort reason\"));\n});\n\nconst result = await Promise.race([\n pipeTo(neverYieldingSource(), writer, { signal: ac.signal }).then(\n () =\u003e \"pipeTo resolved\",\n (error) =\u003e `pipeTo rejected: ${error.name}: ${error.message}`,\n ),\n setTimeout(1000, \"timed out\"),\n]);\n\nconsole.log(result);\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\n```console\npipeTo rejected: Error: abort reason\n```\n\n`pipeTo()` should reject promptly when `options.signal` aborts, even while waiting for the next source chunk in the no-transform path.\n\n\n### What do you see instead?\n\n```console\ntimed out\n```\n\n`pipeTo()` checks `signal.throwIfAborted()` only after `for await` produces a batch, so a pending source read that never settles prevents abort from being observed.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-06-20T01:10:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/64014/node/issues/64014"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:48a047d1-2107-56ae-afa5-e4f6ba99ad20 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C178:232EF3:A79C8D:E5209A:6A4D50BA |
| html-safe-nonce | 7fdca81f0a3135d231c36301425712e0ac6174f017f2c9d4927e4124c48afb9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTc4OjIzMkVGMzpBNzlDOEQ6RTUyMDlBOjZBNEQ1MEJBIiwidmlzaXRvcl9pZCI6IjYyOTgzMTI0MjMxNTAyNzY3OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c27778400e1d4542c9df0868836cbc51b621aa561858b19a9cde3671e06c7471 |
| hovercard-subject-tag | issue:4704537660 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64014/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1312d6fceaf19359dfaad9571aacfc009d6451e50acf9ad906df7e60c797dfbc/nodejs/node/issues/64014 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1312d6fceaf19359dfaad9571aacfc009d6451e50acf9ad906df7e60c797dfbc/nodejs/node/issues/64014 |
| og:image:alt | Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { pipeTo } from "node:stream/iter"; import { setTimeout } from "node:timers/promises"; async function* ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width