update src/common/transfer.cpp.

Signed-off-by: liupeng298 <liupeng298@huawei.com>
This commit is contained in:
liupeng298 2024-09-27 07:31:17 +00:00 committed by Gitee
parent e577077136
commit 85ec1ed028
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -58,6 +58,7 @@ void HdcTransferBase::CloseFd(CtxFile *context, ssize_t fd)
return;
}
auto callback = [](uv_fs_t *fsPtr) -> void {
uv_fs_req_cleanup(fsPtr);
delete fsPtr;
};
uv_fs_close(context->loop, fs, fd, callback);