mirror of https://github.com/stashapp/stash.git
Fix panic when version check times out (#374)
This commit is contained in:
parent
776727140f
commit
bf49a23df8
|
@ -124,14 +124,14 @@ func GetLatestVersion(shortHash bool) (latestVersion string, latestRelease strin
|
|||
|
||||
release := githubReleasesResponse{}
|
||||
|
||||
if response.StatusCode != http.StatusOK {
|
||||
return "", "", fmt.Errorf("Github API request failed: %s", response.Status)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("Github API request failed: %s", err)
|
||||
}
|
||||
|
||||
if response.StatusCode != http.StatusOK {
|
||||
return "", "", fmt.Errorf("Github API request failed: %s", response.Status)
|
||||
}
|
||||
|
||||
defer response.Body.Close()
|
||||
|
||||
data, err := ioutil.ReadAll(response.Body)
|
||||
|
|
Loading…
Reference in New Issue