mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-09 13:21:42 +00:00
When the connection pool is in a degraded state after _drain_polling_connections(), start_polling() can hang indefinitely when both primary and fallback Telegram endpoints are unreachable. The httpx client may hold a stale socket that neither connects nor times out within PTB's internal flow, causing the reconnect ladder to stall at attempt 1/10 forever. Wrap start_polling() in asyncio.wait_for() with a 30-second timeout so a hung call raises asyncio.TimeoutError and feeds back into the existing retry ladder. This unblocks: - The 10-retry ladder advances to attempt 2, 3, ... - The heartbeat loop sees _polling_error_task.done() and can trigger recovery - The reconnect watcher gets the adapter in _failed_platforms Fixes #59614 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| adapter.py | ||
| plugin.yaml | ||
| telegram_ids.py | ||
| telegram_network.py | ||