mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 11:28:54 +00:00
Merge pull request 2187 from restic/fix-2181
self-update: Don't cancel download after 30s
This commit is contained in:
commit
7b8d1dc040
3
changelog/unreleased/issue-2181
Normal file
3
changelog/unreleased/issue-2181
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Bugfix: Don't cancel timeout after 30 seconds for self-update
|
||||||
|
|
||||||
|
https://github.com/restic/restic/issues/2181
|
@ -112,9 +112,6 @@ func GitHubLatestRelease(ctx context.Context, owner, repo string) (Release, erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getGithubData(ctx context.Context, url string) ([]byte, error) {
|
func getGithubData(ctx context.Context, url string) ([]byte, error) {
|
||||||
ctx, cancel := context.WithTimeout(ctx, githubAPITimeout)
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodGet, url, nil)
|
req, err := http.NewRequest(http.MethodGet, url, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user