Title: stream/iter consumers do not reject on abort while async iterator is pending · Issue #64065 · nodejs/node · GitHub
Open Graph Title: stream/iter consumers do not reject on abort while async iterator is pending · Issue #64065 · nodejs/node
X Title: stream/iter consumers do not reject on abort while async iterator is pending · Issue #64065 · nodejs/node
Description: Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { array, arrayBuffer, bytes, text, } from 'node:stream/iter'; import { setTimeout } from 'node:timers/promises'; async function* never() { awai...
Open Graph Description: Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { array, arrayBuffer, bytes, text, } from 'node:stream/iter'; import { setTimeout } from 'node:timers/p...
X Description: Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { array, arrayBuffer, bytes, text, } from 'node:stream/iter'; import { setTimeout } from 'n...
Opengraph URL: https://github.com/nodejs/node/issues/64065
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream/iter consumers do not reject on abort while async iterator is pending","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 {\n array,\n arrayBuffer,\n bytes,\n text,\n} from 'node:stream/iter';\nimport { setTimeout } from 'node:timers/promises';\n\nasync function* never() {\n await new Promise(() =\u003e {});\n}\n\nasync function check(name, fn) {\n const ac = new AbortController();\n\n setTimeout(10).then(() =\u003e ac.abort(new Error('boom')));\n\n const result = await Promise.race([\n fn(never(), { signal: ac.signal })\n .then(() =\u003e `${name} resolved`)\n .catch((err) =\u003e `${name} rejected: ${err.message}`),\n setTimeout(80, `${name} timeout`),\n ]);\n\n console.log(result);\n}\n\nawait check('bytes', bytes);\nawait check('text', text);\nawait check('arrayBuffer', arrayBuffer);\nawait check('array', array);\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\nbytes rejected: boom\ntext rejected: boom\narrayBuffer rejected: boom\narray rejected: boom\n```\n\n### What do you see instead?\n\n```console\nbytes timeout\ntext timeout\narrayBuffer timeout\narray timeout\n```\n\nAll four consumers accept `{ signal }`, but aborting the signal does not settle the operation while the source’s async iterator is stuck in a pending `next()`. They should reject promptly with the abort reason instead of waiting for another batch to arrive.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-06-22T14:47:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/64065/node/issues/64065"}
| 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:9ed16783-b69a-f6d9-559f-12355fc1ec50 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D5E2:3D5977:118C5CE:17B4552:6A4D680C |
| html-safe-nonce | a3e98338fa232a8f1e275087113bfefcce59cd295a5328e304d7bc39b152f8e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUUyOjNENTk3NzoxMThDNUNFOjE3QjQ1NTI6NkE0RDY4MEMiLCJ2aXNpdG9yX2lkIjoiNDkwMDc3MDIyNzI3MTA2NzY2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fda79e13c411ce6e8a041be49cc9a8d8f79dd028447d2f614bd1e804543c71b2 |
| hovercard-subject-tag | issue:4717747314 |
| 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/64065/issue_layout |
| twitter:image | https://opengraph.githubassets.com/59e96a9575635a558590bed5599511d992dbd0d5af5c2b79779aca7f3eea7da4/nodejs/node/issues/64065 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/59e96a9575635a558590bed5599511d992dbd0d5af5c2b79779aca7f3eea7da4/nodejs/node/issues/64065 |
| og:image:alt | Version main Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { array, arrayBuffer, bytes, text, } from 'node:stream/iter'; import { setTimeout } from 'node:timers/p... |
| 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 | 7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9 |
| 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 | cd8f6a71db61d6012a0cbb134be844fdbe9b8a45 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width