deno
e1ef181d - fix(ext/node): set kLastWriteWasAsync in JS write path to prevent double callback (#32814)

Commit
132 days ago
fix(ext/node): set kLastWriteWasAsync in JS write path to prevent double callback (#32814) ## Summary - Set `streamBaseState[kLastWriteWasAsync] = 1` in the JS `writeBuffer` and `writev` fast path before returning, so `afterWriteDispatched` correctly identifies the write as async and defers the callback - Without this, a preceding Rust sync write (e.g. TTY stdout) leaves `kLastWriteWasAsync=0`, causing a subsequent JS Pipe write to fire the callback twice → `ERR_MULTIPLE_CALLBACK` Fixes #32803 Fixes #32813 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Parents
Loading