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:
await self._connecting_task
except (OSError, asyncio.TimeoutError, asyncio.CancelledError):
except (OSError, asyncio.TimeoutError, asyncio.CancelledError) as exc:
await self.bail()
return
if isinstance(exc, asyncio.CancelledError):
return
raise
else:
await self._on_connection_changed(True)
finally: