⚗️ add option for ws reconnect

This commit is contained in:
yanyongyu
2021-11-30 12:24:09 +08:00
parent a6112fdf64
commit b92c1a0b33
3 changed files with 15 additions and 1 deletions

View File

@ -407,6 +407,12 @@ class Driver(ForwardDriver):
if bot:
self._bot_disconnect(bot)
bot = None
if not setup_.reconnect:
logger.info(
f"WebSocket reconnect disabled for bot {setup_.self_id}"
)
break
await asyncio.sleep(setup_.reconnect_interval)
except asyncio.CancelledError: