Files
openclaw/src
Tyson Cung dcf1ea4287 fix(telegram): add download timeout to prevent polling loop hang
When downloading large files via Telegram, if the stream stalls mid-download
(e.g. no Content-Length header, network congestion), the polling loop hangs
indefinitely since reader.read() has no timeout.

Changes:
- Add timeoutMs option to fetchRemoteMedia, passed through to fetchWithSsrFGuard
- Add per-chunk timeout (30s default) to readResponseWithLimit via Promise.race
- Set 30s download timeout for Telegram media fetches

This ensures stalled downloads are aborted and the polling loop continues
processing subsequent messages.

Fixes #40074
2026-03-09 08:21:43 +05:30
..