diff --git a/src/isar/state_machine/states/monitor.py b/src/isar/state_machine/states/monitor.py index e92bc76e..e573bd03 100644 --- a/src/isar/state_machine/states/monitor.py +++ b/src/isar/state_machine/states/monitor.py @@ -49,7 +49,6 @@ def stop(self) -> None: if self.task_status_thread: self.task_status_thread.wait_for_thread() self.task_status_thread = None - self.request_status_failure_counter = 0 def _run(self) -> None: transition: Callable @@ -197,6 +196,7 @@ def _queue_inspections_for_upload( self.logger.info(f"Inspection: {str(inspection.id)[:8]} queued for upload") def _report_task_status(self, task: Task) -> None: + self.request_status_failure_counter = 0 if task.status == TaskStatus.Failed: self.logger.warning( f"Task: {str(task.id)[:8]} was reported as failed by the robot"