forked from kent/consciousness
HttpClient::request_timeout only covers send_request, not body collect, so a stuck download would otherwise stall the entire long-poll loop indefinitely. tokio::time::timeout at the call site keeps the failure contained — a slow/dead download surfaces as the same [image: download failed: ...] marker as any other error. 60s is generous for the 1-5MB photos Kent typically sends; Telegram's bot getFile cap is 20MB, which would still complete on most connections. Co-Authored-By: Proof of Concept <poc@bcachefs.org> |
||
|---|---|---|
| .. | ||
| main.rs | ||