Unverified Commit e239f5ea authored by James M Snell's avatar James M Snell
Browse files

fs: fix FileHandle::ClosePromise to return persisted Promise



Makes the FileHandle::ClosePromise() idempotent, always returning
the same Promise after it has already been successfully called
once. Avoids the possibility of accidental double close events.

Signed-off-by: default avatarJames M Snell <jasnell@gmail.com>

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


Reviewed-By: default avatarRobert Nagy <ronagy@icloud.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent 6ad3872d
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