mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-12-03 15:42:16 +00:00
Closes #2476 The polling error callback previously only handled Conflict errors (409 from multiple getUpdates callers). All other errors, including NetworkError and TimedOut that python-telegram-bot raises when the host loses connectivity (Mac sleep, WiFi switch, VPN reconnect), were logged and silently discarded. The bot would stop responding until manually restarted. Fix: - Add _looks_like_network_error() to classify transient connectivity errors (NetworkError, TimedOut, OSError, ConnectionError). - Add _handle_polling_network_error() with exponential back-off reconnect: retries up to 10 times with delays 5s, 10s, 20s, 40s, 60s (capped). On exhaustion, marks the adapter retryable-fatal so launchd/systemd can restart the gateway process. - Refactor _polling_error_callback() to route network errors to the new handler before falling through to a generic error log. - Track _polling_network_error_count (reset on successful reconnect) independently from _polling_conflict_count. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| ADDING_A_PLATFORM.md | ||
| api_server.py | ||
| base.py | ||
| dingtalk.py | ||
| discord.py | ||
| email.py | ||
| homeassistant.py | ||
| matrix.py | ||
| mattermost.py | ||
| signal.py | ||
| slack.py | ||
| sms.py | ||
| telegram.py | ||
| webhook.py | ||
| whatsapp.py | ||