Files
node/lib
James M Snell 3169ab0ccf stream: guard shareSync() against re-entrant source reads
If a shareSync() source read from a consumer of the same share while
producing a value, the nested read re-entered the source iterator.
For generators this threw "Generator is already running" from inside
the nested read, which recorded that error as the share's source
error while the outer read was still in progress, leaving every
consumer in an error state.

Fail the nested read with ERR_INVALID_STATE before touching the
share's state. The source sees the error and may handle it; if it lets
it escape, it becomes the source error as with any other source
failure.

Assisted-by: OpenCode
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66483
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-10-10 17:56:10 +00:00
..
2026-09-03 15:37:21 +00:00
…
…
…
…
…
…
…
…
2026-09-05 02:49:02 +00:00
2026-09-28 04:22:37 +00:00
2026-09-12 11:52:10 +00:00
…
…
2026-09-03 11:40:52 +02:00
…
2026-10-04 03:56:13 +00:00
…
…
2026-10-05 21:26:47 +00:00
…
…
…
…
…
…
…
…
…
…
…
2026-09-03 11:48:46 +02:00
…
…