mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(qqbot): add backoff upper-bound check for QQCloseError reconnect path
The QQCloseError (non-4008) reconnect path in _listen_loop was missing the MAX_RECONNECT_ATTEMPTS upper-bound check that exists in both the Exception handler (line 546) and the 4008 rate-limit handler (line 486). Without this check, if _reconnect() fails permanently for any non-4008 close code, backoff_idx grows indefinitely and the bot retries forever at 60-second intervals instead of giving up cleanly. Fix: add the same guard after backoff_idx += 1 in the general QQCloseError branch, consistent with the existing Exception path.
This commit is contained in:
parent
a4877faf96
commit
ec7e92082d
1 changed files with 3 additions and 0 deletions
|
|
@ -535,6 +535,9 @@ class QQAdapter(BasePlatformAdapter):
|
|||
quick_disconnect_count = 0
|
||||
else:
|
||||
backoff_idx += 1
|
||||
if backoff_idx >= MAX_RECONNECT_ATTEMPTS:
|
||||
logger.error("[%s] Max reconnect attempts reached (QQCloseError)", self._log_tag)
|
||||
return
|
||||
|
||||
except Exception as exc:
|
||||
if not self._running:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue