Unverified Commit 7eed9d6b authored by Robert Nagy's avatar Robert Nagy Committed by Myles Borins
Browse files

fs: fix WriteStream autoClose order

WriteStream autoClose was implemented by manually
calling .destroy() instead of using autoDestroy
and callback. This caused some invariants related
to order of events to be broken.

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

Backport-PR-URL: https://github.com/nodejs/node/pull/32163


PR-URL: #31790
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
parent 897b1d2e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment