From 066c1fcecec333cc15b1339b39bd5fdb9a0deaed Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 23 Jul 2022 16:03:33 +0100 Subject: [PATCH] Fixed bug where the TargetController was shutting down before the InsightWorker thread, causing the InsightWorker thread to hang as it waited for the TargetController to respond to a command. --- src/Insight/Insight.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Insight/Insight.cpp b/src/Insight/Insight.cpp index 4d652484..6a87a534 100644 --- a/src/Insight/Insight.cpp +++ b/src/Insight/Insight.cpp @@ -177,7 +177,10 @@ namespace Bloom } if (this->workerThread != nullptr && this->workerThread->isRunning()) { + Logger::debug("Stopping InsightWorker thread"); this->workerThread->quit(); + Logger::debug("Waiting for InsightWorker thread to stop"); + this->workerThread->wait(); } this->application.exit(0);