From 72a4621a715702710ed17777168b6e6b47295927 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 20 Jul 2021 11:40:36 -0700 Subject: [PATCH] fixup! fixup! fs: check closing_ in FileHandle::Close --- src/node_file.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index 25dd296687356d..350e66b6e426b8 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -558,8 +558,10 @@ ShutdownWrap* FileHandle::CreateShutdownWrap(Local object) { } int FileHandle::DoShutdown(ShutdownWrap* req_wrap) { - if (closing_ || closed_) - return 0; + if (closing_ || closed_) { + req_wrap->Done(0); + return 1; + } FileHandleCloseWrap* wrap = static_cast(req_wrap); closing_ = true; CHECK_NE(fd_, -1);