update src/daemon/daemon_usb.cpp.

Signed-off-by: liupeng298 <liupeng298@huawei.com>
This commit is contained in:
liupeng298 2024-08-29 07:17:23 +00:00 committed by Gitee
parent 29c2f1b84c
commit 00bb22fd4a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -59,10 +59,9 @@ void HdcDaemonUSB::Stop()
// module
modRunning = false;
WRITE_LOG(LOG_DEBUG, "HdcDaemonUSB Stop free main session");
Base::TryCloseHandle((uv_handle_t *)&checkEP, [](uv_handle_t * handle) {
HdcDaemonUSB *thisClass = reinterpret_cast<HdcDaemonUSB *>(handle->data);
thisClass->CloseEndpoint(&thisClass->usbHandle);
});
Base::TryCloseHandle((uv_handle_t *)&checkEP);
CloseEndpoint(&usbHandle);
WRITE_LOG(LOG_DEBUG, "HdcDaemonUSB Stop free main session finish");
}