From 00bb22fd4a72ed4fcf5e98f8b18391e29195e4bf Mon Sep 17 00:00:00 2001 From: liupeng298 Date: Thu, 29 Aug 2024 07:17:23 +0000 Subject: [PATCH] update src/daemon/daemon_usb.cpp. Signed-off-by: liupeng298 --- src/daemon/daemon_usb.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/daemon/daemon_usb.cpp b/src/daemon/daemon_usb.cpp index 012966be..b3952e10 100644 --- a/src/daemon/daemon_usb.cpp +++ b/src/daemon/daemon_usb.cpp @@ -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(handle->data); - thisClass->CloseEndpoint(&thisClass->usbHandle); - }); + Base::TryCloseHandle((uv_handle_t *)&checkEP); + CloseEndpoint(&usbHandle); + WRITE_LOG(LOG_DEBUG, "HdcDaemonUSB Stop free main session finish"); }