diff --git a/openflexure_microscope/camera/base.py b/openflexure_microscope/camera/base.py index 637fc34c..8dc59dad 100644 --- a/openflexure_microscope/camera/base.py +++ b/openflexure_microscope/camera/base.py @@ -31,12 +31,14 @@ class BaseCamera(metaclass=ABCMeta): self.stop = False # Used to indicate that the stream loop should break self.stream_timeout = 20 - self.stream_timeout_enabled = False self.stream_active = False self.record_active = False self.preview_active = False + # Start the stream worker on init + self.start_worker() + @property @abstractmethod def configuration(self): @@ -154,17 +156,6 @@ class BaseCamera(metaclass=ABCMeta): self.frame = frame self.event.set() # send signal to clients - # Handle timeout - if ( - self.stream_timeout_enabled - and ( # If using timeout - time.time() - self.last_access > self.stream_timeout - ) - and not self.preview_active # And GPU preview is not active - ): - self.frames_iterator.close() - break - try: if self.stop is True: logging.debug("Worker thread flagged for stop.")