Skip to content

Commit

Permalink
🐛 Fix: none 系列驱动器启动失败时未退出应用 (#2687)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu committed May 1, 2024
1 parent 4254fdf commit 9655b94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nonebot/drivers/none.py
Expand Up @@ -68,9 +68,11 @@ async def _startup(self):
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.")

Expand Down

0 comments on commit 9655b94

Please sign in to comment.