Title: stream/iter: Writer.end() ignores AbortSignal · Issue #64726 · nodejs/node · GitHub
Open Graph Title: stream/iter: Writer.end() ignores AbortSignal · Issue #64726 · nodejs/node
X Title: stream/iter: Writer.end() ignores AbortSignal · Issue #64726 · nodejs/node
Description: Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { push } from 'node:stream/iter'; async function repro(label, abortBeforeEnd) { const { writer, readable } = push(); await writer.write('x'); c...
Open Graph Description: Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { push } from 'node:stream/iter'; async function repro(label, abortBeforeEnd) { const { writer, readabl...
X Description: Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { push } from 'node:stream/iter'; async function repro(label, abortBeforeEnd) { const { writer,...
Opengraph URL: https://github.com/nodejs/node/issues/64726
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream/iter: Writer.end() ignores AbortSignal","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nmacOS 26.5.2\n```\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n```js\nimport { push } from 'node:stream/iter';\n\nasync function repro(label, abortBeforeEnd) {\n const { writer, readable } = push();\n await writer.write('x');\n\n const controller = new AbortController();\n if (abortBeforeEnd) controller.abort(new Error('stop'));\n\n const ending = writer.end({ signal: controller.signal }).then(\n (bytes) => `resolved: ${bytes}`,\n (error) => `rejected: ${error.message}`,\n );\n\n if (!abortBeforeEnd) controller.abort(new Error('stop'));\n\n const draining = (async () => {\n for await (const chunk of readable) {\n void chunk;\n }\n })();\n\n console.log(`${label}: ${await ending}`);\n await draining;\n}\n\nawait repro('pre-aborted', true);\nawait repro('aborted while draining', false);\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\nit should reject with the signal’s abort reason in both cases.\n\n### What do you see instead?\n\n```console\npre-aborted: resolved: 1\naborted while draining: resolved: 1\n```\n\n`end()` resolves successfully whether the signal is already aborted or becomes aborted while the buffered data is draining.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-07-25T02:38:26Z","url":"https://github.com/nodejs/node/issues/64726"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:7b37fb2e-e7d4-b277-d06f-1583d89a0873 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8876:35D054:8687A5:AEEE12:6AED3734 |
| html-safe-nonce | fe12f8733677918bb155e91bf6f5a79acf4e85013698e0b0b08d47a66675992d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODc2OjM1RDA1NDo4Njg3QTU6QUVFRTEyOjZBRUQzNzM0IiwidmlzaXRvcl9pZCI6IjU5MDYzNDY1MTM2NTc1NzUyMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0ac8d998deb9f8d9eb7ddcf4203a8ea40c2cefc50cd804e9076a275fc9362c40 |
| hovercard-subject-tag | issue:4973735951 |
| 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/64726/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0e4f13ffa5ad8ff27b4400101c545ce3a2dfc8b8299ed6c00568568ef64a0525/nodejs/node/issues/64726 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0e4f13ffa5ad8ff27b4400101c545ce3a2dfc8b8299ed6c00568568ef64a0525/nodejs/node/issues/64726 |
| og:image:alt | Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { push } from 'node:stream/iter'; async function repro(label, abortBeforeEnd) { const { writer, readabl... |
| 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 | 26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184 |
| 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 | c629ad99c254d306375fc8354d04321c2c362236 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width