Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

The self-update command uses http.Get() which has no timeout, allowing indefinite hangs on slow or unresponsive network connections.

Changes

  • Created HTTP client with 30-second timeout for all update operations
  • Applied to both GitHub API release check and binary download requests
  • Added *.bak to .gitignore and removed tracked backup file
// Create HTTP client with timeout to prevent indefinite hangs
client := &http.Client{
    Timeout: 30 * time.Second,
}

// Use configured client instead of http.Get()
resp, err := client.Get("https://api.github.com/repos/" + repo + "/releases/latest")

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@ops295 ops295 closed this Jan 7, 2026
Copilot AI changed the title [WIP] WIP address feedback on self-update command Add HTTP timeout to self-update downloads Jan 7, 2026
Copilot AI requested a review from ops295 January 7, 2026 02:36
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.

2 participants