From 683fac2e308c3c6a884f3f5aa44c24f54b2ff186 Mon Sep 17 00:00:00 2001 From: Antoine C Date: Sun, 13 Oct 2024 20:33:46 +0100 Subject: [PATCH] fixup! fix: prevent deadlockwith stuck bulk transfer --- src/controllers/bulk/bulkcontroller.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/controllers/bulk/bulkcontroller.cpp b/src/controllers/bulk/bulkcontroller.cpp index 5fea664045b0..737346f16439 100644 --- a/src/controllers/bulk/bulkcontroller.cpp +++ b/src/controllers/bulk/bulkcontroller.cpp @@ -5,14 +5,9 @@ #include "controllers/bulk/bulksupported.h" #include "controllers/defs_controllers.h" #include "moc_bulkcontroller.cpp" -#include "util/cmdlineargs.h" #include "util/time.h" #include "util/trace.h" -namespace { -constexpr unsigned int kBulkSendTimeoutMs = 5000; // In milliseconds -} - BulkReader::BulkReader(libusb_device_handle *handle, unsigned char in_epaddr) : QThread(), m_phandle(handle), @@ -304,7 +299,8 @@ void BulkController::sendBytes(const QByteArray& data) { (unsigned char*)data.constData(), data.size(), &transferred, - kBulkSendTimeoutMs); + 5000 // Send timeout in milliseconds + ); if (ret < 0) { qCWarning(m_logOutput) << "Unable to send data to" << getName() << "serial #" << m_sUID << "-" << libusb_error_name(ret);