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:James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39331 Reviewed-By:
Robert Nagy <ronagy@icloud.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
parent
6ad3872d
Please register or sign in to comment