Raise if OSError

This commit is contained in:
atse 2024-08-22 16:08:54 +08:00
parent baf629ece7
commit 16f3e81384

View File

@ -257,9 +257,11 @@ class MainWindow(QtWidgets.QMainWindow):
) )
try: try:
await self._connecting_task await self._connecting_task
except (OSError, asyncio.TimeoutError, asyncio.CancelledError): except (OSError, asyncio.TimeoutError, asyncio.CancelledError) as exc:
await self.bail() await self.bail()
if isinstance(exc, asyncio.CancelledError):
return return
raise
else: else:
await self._on_connection_changed(True) await self._on_connection_changed(True)
finally: finally: