diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index e2bbc90..7c34377 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -138,6 +138,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): async def closeEvent(self, event): if self.client_watcher is not None: self.client_watcher.stop_watching() + if self.tec_client is not None: + await self.tec_client.disconnect() @asyncSlot() async def connect(self):