Skip to content

Commit

Permalink
feat: 优化服务器停止时的逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq committed Dec 17, 2023
1 parent e999ebd commit 9b5f48c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,11 @@ async def initMain():
logger.info("Server stopped")

if __name__ == "__main__":
start_checkcn_thread()
asyncio.run(initMain())
try:
start_checkcn_thread()
asyncio.run(initMain())
except KeyboardInterrupt:
pass
except:
logger.error('初始化出错,请检查日志')
logger.error(traceback.format_exc())

0 comments on commit 9b5f48c

Please # to comment.