mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
🐛
This commit is contained in:
parent
4b36223b4b
commit
b25c336dd4
@ -116,7 +116,7 @@ func run() {
|
||||
time.Sleep(time.Minute * 20)
|
||||
updateCh <- struct{}{}
|
||||
}()
|
||||
doSelfUpdate(false)
|
||||
doSelfUpdate(true)
|
||||
}()
|
||||
}
|
||||
}()
|
||||
@ -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)
|
||||
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user