Browse Source

fix: panic recover in auto update

v1.x.x
dnomd343 2 years ago
parent
commit
8ba18de621
  1. 5
      cmd/asset/update.go

5
cmd/asset/update.go

@ -13,6 +13,11 @@ type Config struct {
} }
func updateAsset(urls map[string]string, assetDir string) { // download new assets func updateAsset(urls map[string]string, assetDir string) { // download new assets
defer func() {
if err := recover(); err != nil {
log.Errorf("Update failed -> %v", err)
}
}()
if len(urls) != 0 { if len(urls) != 0 {
log.Info("Start update assets") log.Info("Start update assets")
for file, url := range urls { for file, url := range urls {

Loading…
Cancel
Save