Skip to content

Commit adb9569

Browse files
committed
Add reconnect reason
1 parent c79eea8 commit adb9569

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

plugins/check_conn.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ def pinger(bot):
9090

9191
diff = time.time() - last_act
9292
if diff >= (ping_interval * 2):
93+
conn.quit("Reconnecting due to lag...")
94+
time.sleep(1)
95+
conn._quit = False
9396
conn.loop.call_soon_threadsafe(
9497
partial(async_util.wrap_future, conn.connect(), loop=conn.loop)
9598
)

0 commit comments

Comments
 (0)