forked from M-Labs/thermostat
Correct order once the tec_client disconnects to
stop watching the client first
This commit is contained in:
parent
1226cca6e6
commit
30f6c4f829
|
@ -178,13 +178,13 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||||
return
|
return
|
||||||
await self._on_connection_changed(True)
|
await self._on_connection_changed(True)
|
||||||
else:
|
else:
|
||||||
await self.tec_client.disconnect()
|
|
||||||
await self._on_connection_changed(False)
|
await self._on_connection_changed(False)
|
||||||
|
await self.tec_client.disconnect()
|
||||||
|
|
||||||
except (OSError, TimeoutError) as e:
|
except (OSError, TimeoutError) as e:
|
||||||
logging.error(f"Failed communicating to {ip}:{port}: {e}")
|
logging.error(f"Failed communicating to {ip}:{port}: {e}")
|
||||||
await self.tec_client.disconnect()
|
|
||||||
await self._on_connection_changed(False)
|
await self._on_connection_changed(False)
|
||||||
|
await self.tec_client.disconnect()
|
||||||
|
|
||||||
|
|
||||||
async def coro_main():
|
async def coro_main():
|
||||||
|
|
Loading…
Reference in New Issue