cameraThread: bug whhere it would try to quti forever if already quit

This commit is contained in:
2026-06-03 15:54:03 +02:00
parent b8e31a749d
commit 8ebd4cd962
+5 -3
View File
@@ -151,12 +151,14 @@ class SampleCameraThread(QThread):
continue # Check self.running again
except Exception as e:
self.__set_camera_available(False, f"Sample camera feed unavailable: {e}")
self.running = False
def stop(self):
# Signal the thread to stop
self.running = False
if self.__socket:
self.__socket.close()
self.quit()
self.wait()
if self.isRunning():
self.quit()
self.wait(2000)