Title: stream/iter: broadcast consumer can leave earlier next() pending after overlapping next() calls · Issue #63499 · nodejs/node · GitHub
Open Graph Title: stream/iter: broadcast consumer can leave earlier next() pending after overlapping next() calls · Issue #63499 · nodejs/node
X Title: stream/iter: broadcast consumer can leave earlier next() pending after overlapping next() calls · Issue #63499 · nodejs/node
Description: Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: bc } = broadcast(); const it = bc.push()[Symbol.asyncIterator](); const fir...
Open Graph Description: Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: bc } = broadcast(); const it = bc.p...
X Description: Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: bc } = broadcast(); const i...
Opengraph URL: https://github.com/nodejs/node/issues/63499
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream/iter: broadcast consumer can leave earlier next() pending after overlapping next() calls","articleBody":"### Version\n\n26.2.0\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 { broadcast } from 'node:stream/iter';\n\nconst { writer, broadcast: bc } = broadcast();\nconst it = bc.push()[Symbol.asyncIterator]();\n\nconst first = it.next();\nconst second = it.next();\n\nawait writer.write('x');\n\nconsole.log('second next():', await second);\n\nconst result = await Promise.race([\n first.then((value) =\u003e ['settled', value]),\n new Promise((resolve) =\u003e setTimeout(resolve, 50, ['pending'])),\n]);\n\nconsole.log('first next():', ...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\nsecond next(): { done: true, value: undefined }\nfirst next(): settled { done: false, value: [ Uint8Array(1) [ 120 ] ] }\n```\n\n### What do you see instead?\n\n```console\nsecond next(): { done: false, value: [ Uint8Array(1) [ 120 ] ] }\nfirst next(): pending\n```\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-05-23T04:20:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/63499/node/issues/63499"}
| 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:46a5109b-0f8b-dad6-0236-e2a58f2523a3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C162:D1053:5FCC37:81E200:6A4D4018 |
| html-safe-nonce | 36e091d81ad33d2c847f9205883b557af9f098894f4046ca0c8abc7156b91ddb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTYyOkQxMDUzOjVGQ0MzNzo4MUUyMDA6NkE0RDQwMTgiLCJ2aXNpdG9yX2lkIjoiODU3MzIxMzc4Njc1NTA3MjI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7faff1431ce12096fbce0dd4f5ce63d5936770591cb7100a400036d2ac81bea8 |
| hovercard-subject-tag | issue:4506805839 |
| 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/63499/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e0965a9b27a5780c53a8b826d626c10dd27158c8ad0585b440501c4cbadf2f1/nodejs/node/issues/63499 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e0965a9b27a5780c53a8b826d626c10dd27158c8ad0585b440501c4cbadf2f1/nodejs/node/issues/63499 |
| og:image:alt | Version 26.2.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: bc } = broadcast(); const it = bc.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 | 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