浏览代码

Stop checking for updates on boot.

This commit disables the automatic upe check thappens immediately
on boot, giving users an opportunity disable it from the settings UI
before any remote requests are initiated. Tupdate checks happen
every 24 houfter boot.

Ref: #326
Kailash Nadh 4 年之前
父节点
当前提交
44adcd44de
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cmd/updates.go

+ 1 - 1
cmd/updates.go

@@ -36,7 +36,7 @@ func checkUpdates(curVersion string, interval time.Duration, app *App) {
 	ticker := time.NewTicker(interval)
 	ticker := time.NewTicker(interval)
 	defer ticker.Stop()
 	defer ticker.Stop()
 
 
-	for ; true; <-ticker.C {
+	for range ticker.C {
 		resp, err := http.Get(updateCheckURL)
 		resp, err := http.Get(updateCheckURL)
 		if err != nil {
 		if err != nil {
 			app.log.Printf("error checking for remote update: %v", err)
 			app.log.Printf("error checking for remote update: %v", err)