Skip to content

fix(qqapp): exponential reconnect backoff - #279

Merged
lsdefine merged 1 commit into
lsdefine:mainfrom
sontianye:fix/qqapp-reconnect-backoff
May 7, 2026
Merged

lsdefine merged 1 commit into
lsdefine:mainfrom
sontianye:fix/qqapp-reconnect-backoff

Conversation

@sontianye

Copy link
Copy Markdown
Contributor

What

Replace the fixed 5s reconnect sleep with exponential backoff: 5 → 10 → 20 → … → 300s, resetting to 5s when a session lived ≥60s.

Why

A misconfigured credential or sustained QQ platform outage causes the current loop to retry every 5s indefinitely, flooding qqapp.log and hammering the platform auth endpoint. Backoff lets pressure relax while still recovering quickly from a one-off blip.

dcapp.py (added in the same codebase) already uses this exact pattern — this PR brings qqapp.py in line with it.

Solved

  • Sustained failures no longer flood the log or burn the reconnect budget.
  • Transient blips (session lived ≥60s before dropping) still recover with a 5s delay.

Replace fixed 5s sleep with the same backoff pattern already used in
dcapp.py: 5 -> 10 -> 20 -> ... -> 300s, resetting to 5s when a session
survived >=60s. Uses time.monotonic() to avoid clock-jump skew.
@lsdefine
lsdefine merged commit 346d26b into lsdefine:main May 7, 2026
bendusy pushed a commit to bendusy/GenericAgent that referenced this pull request May 14, 2026
…ckoff

fix(qqapp): exponential reconnect backoff
RocketLi pushed a commit to RocketLi/GenericAgent that referenced this pull request May 18, 2026
…ckoff

fix(qqapp): exponential reconnect backoff
lsdefine added a commit that referenced this pull request Jul 23, 2026
fix(qqapp): exponential reconnect backoff
Imzl-zl pushed a commit to Imzl-zl/GenericAgent that referenced this pull request Aug 5, 2026
…ckoff

fix(qqapp): exponential reconnect backoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants