Skip to content

Commit

Permalink
🐛 ensure bot connected before disconnect (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 authored Nov 11, 2023
1 parent b6686ea commit 6b82f09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nonebot/adapters/qq/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ async def _forward_ws(self, bot: Bot, ws_url: URL, shard: Tuple[int, int]) -> No
if heartbeat_task:
heartbeat_task.cancel()
heartbeat_task = None
self.bot_disconnect(bot)
if bot.self_id in self.bots:
self.bot_disconnect(bot)

except Exception as e:
log(
Expand Down

0 comments on commit 6b82f09

Please sign in to comment.