Skip to content

Commit

Permalink
🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Nov 4, 2021
1 parent 4b36223 commit b25c336
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func run() {
time.Sleep(time.Minute * 20)
updateCh <- struct{}{}
}()
doSelfUpdate(false)
doSelfUpdate(true)
}()
}
}()
Expand Down Expand Up @@ -238,9 +238,9 @@ func reportState() {
}
}

func doSelfUpdate(donNotUseLocalVersion bool) {
func doSelfUpdate(useLocalVersion bool) {
v := semver.MustParse("0.1.0")
if !donNotUseLocalVersion {
if useLocalVersion {
v = semver.MustParse(version)
}
println("检查更新:", v)
Expand All @@ -258,7 +258,7 @@ func handleUpgradeTask(task *pb.Task, result *pb.TaskResult) {
if agentConf.DisableForceUpdate {
return
}
doSelfUpdate(true)
doSelfUpdate(false)
}

func handleTcpPingTask(task *pb.Task, result *pb.TaskResult) {
Expand Down

0 comments on commit b25c336

Please sign in to comment.