From 7c5bd633ccb915bcfa25949bf2dcd5a9b3805e52 Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 24 Jun 2024 17:32:45 +0800 Subject: [PATCH] Try fix force-disconnections when autotuning --- pytec/pytec/gui/model/thermostat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytec/pytec/gui/model/thermostat.py b/pytec/pytec/gui/model/thermostat.py index ea3191f..a788469 100644 --- a/pytec/pytec/gui/model/thermostat.py +++ b/pytec/pytec/gui/model/thermostat.py @@ -51,6 +51,7 @@ class Thermostat(QObject, metaclass=PropertyMeta): "Encountered an error while updating parameter tree.", exc_info=True, ) + self._watch_task.cancel() _ = self.task.result() self.task = asyncio.create_task(self.update_params()) await asyncio.sleep(self._update_s)