F checkUpdate() panic

This commit is contained in:
crescentBLADE 2022-04-18 10:42:19 +08:00
parent d0fe65bbc4
commit 2897f5a6a6

View File

@ -277,6 +277,13 @@ func handleClientSignal() {
} }
func checkUpdate() { func checkUpdate() {
defer func(){
if err:=recover();err!=nil{
println("Check failed")
fmt.Printf("Check error: %+v\n",err)
return
}
}()
resp, err := http.Get("https://api.github.com/repos/zhenorzz/goploy/releases/latest") resp, err := http.Get("https://api.github.com/repos/zhenorzz/goploy/releases/latest")
if err != nil { if err != nil {
println("Check failed") println("Check failed")