Skip to content

fix: Telegram 409 polling conflict treated as permanently fatal - #2298

Closed
dieutx wants to merge 1 commit into
NousResearch:mainfrom
dieutx:fix/issue-2296
Closed

fix: Telegram 409 polling conflict treated as permanently fatal#2298
dieutx wants to merge 1 commit into
NousResearch:mainfrom
dieutx:fix/issue-2296

Conversation

@dieutx

@dieutx dieutx commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix for #2296: [Bug]: Telegram 409 polling conflict treated as permanently fatal — no retry

Closes #2296

Test plan

  • Run pytest to confirm no regressions

Transient 409 Conflict errors from Telegram's getUpdates are expected
during gateway restarts (--replace handoff, systemd restart, etc.) when
the old long-poll session hasn't fully expired on Telegram's server.

Retry up to 3 times with a 10-second delay (30s total window) before
marking the conflict as permanently fatal. This gives Telegram's server
time to release stale sessions while still protecting against genuine
dual-instance conflicts.

Closes NousResearch#2296
@teknium1

Copy link
Copy Markdown
Contributor

Closing in favor of #2297 which takes a more thorough approach — it explicitly stops and restarts the polling subsystem on retry rather than relying on passive recovery, resets the counter on success, and includes test coverage. Thanks for the contribution!

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.

[Bug]: Telegram 409 polling conflict treated as permanently fatal — no retry

2 participants