From 585c35b4c907a9b7cd974bc08d0788c9f8fd0512 Mon Sep 17 00:00:00 2001 From: atse Date: Wed, 28 Aug 2024 16:09:30 +0800 Subject: [PATCH] fixup forgetting to await --- pytec/tec_qt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 8447d12..b395f52 100755 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -65,11 +65,12 @@ class MainWindow(QtWidgets.QMainWindow): ) self._connecting_task = None - def handle_connection_error(): + @asyncSlot() + async def handle_connection_error(): self.info_box.display_info_box( "Connection Error", "Thermostat connection lost. Is it unplugged?" ) - self.thermostat.end_session() + await self.thermostat.end_session() self.thermostat.connection_error.connect(handle_connection_error)