diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index 88a97f40..42a5e2b9 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -148,7 +148,7 @@ void Hyperion::start() void Hyperion::stop() { emit finished(); - thread()->quit(); + thread()->wait(); } void Hyperion::freeObjects(bool emitCloseSignal) diff --git a/libsrc/hyperion/HyperionIManager.cpp b/libsrc/hyperion/HyperionIManager.cpp index 22b0ee51..7c1b37d5 100644 --- a/libsrc/hyperion/HyperionIManager.cpp +++ b/libsrc/hyperion/HyperionIManager.cpp @@ -71,6 +71,7 @@ bool HyperionIManager::startInstance(const quint8& inst, const bool& block) connect(hyperionThread, &QThread::finished, hyperionThread, &QObject::deleteLater); connect(hyperion, &Hyperion::started, HyperionIManager::getInstance(), &HyperionIManager::handleStarted); connect(hyperion, &Hyperion::finished, HyperionIManager::getInstance(), &HyperionIManager::handleFinished); + connect(hyperion, &Hyperion::finished, hyperionThread, &QThread::quit, Qt::DirectConnection); // setup further connections // from Hyperion