forked from M-Labs/thermostat
Compare commits
3 Commits
69339b998b
...
9763225b45
Author | SHA1 | Date |
---|---|---|
atse | 9763225b45 | |
atse | d682ba4789 | |
atse | 776f8521b6 |
|
@ -78,7 +78,7 @@ class WrappedClient(QObject, Client):
|
|||
async def _read_line(self):
|
||||
try:
|
||||
return await super()._read_line()
|
||||
except (OSError, TimeoutError) as e:
|
||||
except (OSError, TimeoutError, asyncio.TimeoutError) as e: # TODO: Remove asyncio.TimeoutError in Python 3.11
|
||||
logging.error("Client connection error, disconnecting", exc_info=True)
|
||||
self.connection_error.emit()
|
||||
|
||||
|
@ -690,7 +690,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
else:
|
||||
await self.bail()
|
||||
|
||||
except (OSError, TimeoutError) as e:
|
||||
except (OSError, TimeoutError, asyncio.TimeoutError) as e: # TODO: Remove asyncio.TimeoutError in Python 3.11
|
||||
logging.error(f"Failed communicating to {host}:{port}: {e}")
|
||||
await self.bail()
|
||||
|
||||
|
|
Loading…
Reference in New Issue