fix(discord): preserve cleanup during startup stop (#6426)

This commit is contained in:
InfinityPacer
2026-08-23 21:28:12 +08:00
committed by GitHub
parent e1509c4e0d
commit 7d10483961
2 changed files with 48 additions and 5 deletions
-5
View File
@@ -264,11 +264,6 @@ class Discord:
).result(timeout=10)
except Exception as err:
logger.error(f"关闭 Discord Bot 失败:{err}")
elif not loop.is_closed():
try:
loop.call_soon_threadsafe(loop.stop)
except RuntimeError:
pass
self._ready_event.clear()
thread.join(timeout=5)
if thread.is_alive():