Skip to content

fix(update): remove 60s download timeout that fails on slow connections#118

Merged
alikhajeh1 merged 2 commits into
mainfrom
fix/update-download-timeout
Jun 2, 2026
Merged

fix(update): remove 60s download timeout that fails on slow connections#118
alikhajeh1 merged 2 commits into
mainfrom
fix/update-download-timeout

Conversation

@alikhajeh1

@alikhajeh1 alikhajeh1 commented May 29, 2026

Copy link
Copy Markdown
Member

Running infracost update on a slow connection I keep getting this:
✔ Update check complete
→ Updating 2.1.0 → v2.2.0...
Error: failed to read asset: context deadline exceeded (Client.Timeout or context cancellation while reading body)

http.Client{Timeout: 60s} applies a wall-clock deadline over the entire HTTP lifecycle — connection, redirect, and body read. Downloading a 30–50 MB binary archive over a slow connection easily exceeds this, causing failed to read asset: context deadline exceeded.

Replaced with http.DefaultClient (no hard timeout). The ctx passed to DownloadReleaseAsset already handles user cancellation (Ctrl+C).

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alikhajeh1 alikhajeh1 self-assigned this May 29, 2026
@alikhajeh1 alikhajeh1 requested a review from liamg May 29, 2026 16:25
@alikhajeh1 alikhajeh1 marked this pull request as ready for review June 1, 2026 16:19
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alikhajeh1 alikhajeh1 merged commit fcb91e8 into main Jun 2, 2026
4 checks passed
@alikhajeh1 alikhajeh1 deleted the fix/update-download-timeout branch June 2, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants