From 9911f72059886ea293b3cec7be8817e553f69672 Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 9 Sep 2024 14:52:33 +0800 Subject: [PATCH] Order? --- pytec/tec_qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index fa78e45..6fd9548 100755 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -201,11 +201,11 @@ class MainWindow(QtWidgets.QMainWindow): case ThermostatConnectionState.CONNECTING: self._connecting_task.cancel() + self._connecting_task = None await self._thermostat.end_session() self._thermostat.connection_state = ( ThermostatConnectionState.DISCONNECTED ) - self._connecting_task = None case ThermostatConnectionState.CONNECTED: await self._thermostat.end_session()