🐛 Fix: none 系列驱动器启动失败时未退出应用 (#2687)

This commit is contained in:
Ju4tCode 2024-05-01 13:38:47 +08:00 committed by GitHub
parent 4254fdfd8c
commit 9655b941f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,9 +68,11 @@ class Driver(BaseDriver):
await self._lifespan.startup()
except Exception as e:
logger.opt(colors=True, exception=e).error(
"<r><bg #f8bbd0>Error when running startup function. "
"Ignored!</bg #f8bbd0></r>"
"<r><bg #f8bbd0>Application startup failed. "
"Exiting.</bg #f8bbd0></r>"
)
self.should_exit.set()
return
logger.info("Application startup completed.")