summaryrefslogtreecommitdiff
path: root/src/components/transport_manager/src/usb/libusb/usb_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/transport_manager/src/usb/libusb/usb_handler.cc')
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_handler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/transport_manager/src/usb/libusb/usb_handler.cc b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
index d1fc0af7f7..8180d257ee 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_handler.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
@@ -100,8 +100,8 @@ UsbHandler::~UsbHandler() {
libusb_hotplug_deregister_callback(libusb_context_, left_callback_handle_);
}
- thread_->join();
- delete thread_->delegate();
+ thread_->Stop(threads::Thread::kThreadSoftStop);
+ delete thread_->GetDelegate();
threads::DeleteThread(thread_);
if (libusb_context_) {
@@ -324,7 +324,7 @@ TransportAdapter::Error UsbHandler::Init() {
return TransportAdapter::FAIL;
}
- if (!thread_->start()) {
+ if (!thread_->Start()) {
LOG4CXX_ERROR(logger_,
"USB device scanner thread start failed, error code");
LOG4CXX_TRACE(logger_, "exit with TransportAdapter::FAIL.");