Skip to content

Add timeouts to license download to prevent hanging#741

Merged
robstryker merged 1 commit into
masterfrom
issue-740-license-download-timeout
May 13, 2026
Merged

Add timeouts to license download to prevent hanging#741
robstryker merged 1 commit into
masterfrom
issue-740-license-download-timeout

Conversation

@robstryker
Copy link
Copy Markdown
Collaborator

Fixes #740

Summary

  • Add connection and read timeouts to license download in DownloadRuntime
  • Prevents indefinite hanging when license URLs are unreachable
  • Uses 2.5 second connection timeout and 5 second read timeout

Changes

  • Modified DownloadRuntime.getLicense() to use URLConnection with timeout configuration instead of URL.openStream()
  • Added setConnectTimeout(2500) for connection timeout
  • Added setReadTimeout(5000) for read timeout

Test plan

  • Build the project to ensure no compilation errors
  • Verify that license downloads still work for reachable URLs
  • Verify that unreachable license URLs now fail quickly instead of hanging

🤖 Generated with Claude Code

When license URLs are unreachable (e.g., gnu.org down), the license
download would hang indefinitely. This change adds connection and
read timeouts to prevent indefinite blocking.

- Add 2.5 second connection timeout
- Add 5 second read timeout
- Use URLConnection instead of URL.openStream() to allow timeout configuration

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@robstryker robstryker merged commit c603102 into master May 13, 2026
1 check passed
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.

Add timeout to license text download to prevent hanging

1 participant