We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07b3840 commit 831afcaCopy full SHA for 831afca
2 files changed
astrbot/core/platform/sources/kook/kook_adapter.py
@@ -135,7 +135,7 @@ async def _main_loop(self):
135
# 等待一段时间后重试
136
wait_time = min(
137
2**consecutive_failures, max_retry_delay
138
- ) # 指数退避,最大60秒
+ ) # 指数退避
139
logger.info(f"[KOOK] 等待 {wait_time} 秒后重试...")
140
await asyncio.sleep(wait_time)
141
astrbot/core/platform/sources/kook/kook_client.py
@@ -255,8 +255,10 @@ async def _heartbeat_loop(self):
255
"""心跳循环"""
256
while self.running:
257
try:
258
- # 随机化心跳间隔 (30±5秒)
259
- interval = self.config.heartbeat_interval + random.randint(-5, 5)
+ # 随机化心跳间隔 (±5秒)
+ interval = max(
260
+ 1, self.config.heartbeat_interval + random.randint(-5, 5)
261
+ )
262
await asyncio.sleep(interval)
263
264
if not self.running:
0 commit comments