Raise if OSError

This commit is contained in:
atse 2024-08-22 16:08:54 +08:00
parent 93e0bd91bf
commit 506d350d7f

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: