cameraThread: bug whhere it would try to quti forever if already quit
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user