From 9c0c6ab3231337821117c146b6b7e7da2ec09b50 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 934c980..a90f145 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()