You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importhttpfrom'node:http';constmsg=newhttp.OutgoingMessage();msg.destroy();constresult=awaitPromise.race([newPromise((resolve)=>{msg._writeRaw('data',(err)=>resolve(err?.code??'no error'));}),newPromise((resolve)=>setTimeout(()=>resolve('callback not called'),100)),]);console.log(result);
Observed
callback not called
This is because _writeRaw() returns after destruction without invoking the callback
Expected
ERR_STREAM_DESTROYED
This should match stream write callback behavior for already-destroyed streams.
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Activity
trivikr commentedon May 20, 2026
Tested with node 26.1.0
Minimal repro
Observed
callback not calledThis is because
_writeRaw()returns after destruction without invoking the callbackExpected
ERR_STREAM_DESTROYEDThis should match stream write callback behavior for already-destroyed streams.
http: call _writeRaw callback when destroyed
github-actions commentedon Aug 19, 2026
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Sep 19, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.