Files
node/test/parallel
Trivikram Kamat 8c495c8030 stream: wait for push writer end fallback to drain
When endSync() returns -1 after buffered writes, a follow-up end()
should stay pending until the readable side drains the queued data.

Do not make duplex channel close() wait for that drain, since close()
only needs to signal EOF to the peer. Waiting there can deadlock when
the peer starts reading only after close() resolves.

Fixes: https://github.com/nodejs/node/issues/63502

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63503
Fixes: https://github.com/nodejs/node/issues/63502
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-25 06:50:32 +00:00
..