Merge pull request #949 from qiulaidongfeng/master

Avoid panic after connection failure
This commit is contained in:
Corey Butler
2023-03-19 00:12:30 -05:00
committed by GitHub

View File

@@ -107,6 +107,7 @@ func Download(url string, target string, version string) bool {
response, err := client.Do(req)
if err != nil {
fmt.Println("Error while downloading", url, "-", err)
return false
}
defer response.Body.Close()
c := make(chan os.Signal, 2)