mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
fix(telegram): harden flood fallback recovery
Keep empty-tail recovery scoped to the current stream segment and bound fallback flood retries. Preserve Telegram's server retry hint without blocking final delivery through a long cooldown.
This commit is contained in:
parent
04898631cb
commit
4aa499ff9f
3 changed files with 113 additions and 16 deletions
|
|
@ -4075,7 +4075,11 @@ class TelegramAdapter(BasePlatformAdapter):
|
|||
self.name, wait,
|
||||
)
|
||||
if wait > 5.0:
|
||||
return SendResult(success=False, error=f"flood_control:{wait}")
|
||||
return SendResult(
|
||||
success=False,
|
||||
error=f"flood_control:{wait}",
|
||||
retry_after=float(wait),
|
||||
)
|
||||
await asyncio.sleep(wait)
|
||||
try:
|
||||
await self._bot.edit_message_text(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue