forked from M-Labs/thermostat
Catch a more specific exception
This commit is contained in:
parent
115c7eb800
commit
fd83ee23e1
|
@ -199,7 +199,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
self.tec_client = None
|
||||
self._on_connection_changed(False)
|
||||
|
||||
except Exception as e:
|
||||
except (OSError, TimeoutError) as e:
|
||||
logging.error(f"Failed communicating to {ip}:{port}: {e}")
|
||||
await self.tec_client.disconnect()
|
||||
self._on_connection_changed(False)
|
||||
|
|
Loading…
Reference in New Issue