diff --git a/Desktop_Interface/mainwindow.cpp b/Desktop_Interface/mainwindow.cpp index 6b5ca66b..b778f184 100644 --- a/Desktop_Interface/mainwindow.cpp +++ b/Desktop_Interface/mainwindow.cpp @@ -1226,7 +1226,7 @@ void MainWindow::reinitUsb(void){ reinitUsbStage2(); } else{ ui->controller_iso->driver->shutdownProcedure(); - QTimer::singleShot(3500, this, SLOT(reinitUsbStage2())); + QTimer::singleShot(1000, this, SLOT(reinitUsbStage2())); } #endif qDebug() << "ReinitUsb Stage 1 complete"; diff --git a/Desktop_Interface/unixusbdriver.cpp b/Desktop_Interface/unixusbdriver.cpp index 2a00b474..50e17700 100644 --- a/Desktop_Interface/unixusbdriver.cpp +++ b/Desktop_Interface/unixusbdriver.cpp @@ -18,9 +18,14 @@ unixUsbDriver::~unixUsbDriver(void){ qDebug() << "\n\nunixUsbDriver destructor ran!"; //unixDriverDeleteMutex.lock(); if(connected){ - workerThread->terminate(); + workerThread->deleteLater(); + while(workerThread->isRunning()){ + workerThread->quit(); + qDebug() << "isRunning?" << workerThread->isFinished(); + QThread::msleep(100); + } delete(isoHandler); - delete(workerThread); + //delete(workerThread); qDebug() << "THREAD Gone!"; for (int i=0; i