Try fix force-disconnections when autotuning

This commit is contained in:
atse 2024-06-24 17:32:45 +08:00
parent 4bc7d9ce45
commit 7c5bd633cc

View File

@ -51,6 +51,7 @@ class Thermostat(QObject, metaclass=PropertyMeta):
"Encountered an error while updating parameter tree.", "Encountered an error while updating parameter tree.",
exc_info=True, exc_info=True,
) )
self._watch_task.cancel()
_ = self.task.result() _ = self.task.result()
self.task = asyncio.create_task(self.update_params()) self.task = asyncio.create_task(self.update_params())
await asyncio.sleep(self._update_s) await asyncio.sleep(self._update_s)