Skip to content

Commit

Permalink
stop auto update loop if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Distortions81 committed Dec 11, 2023
1 parent 9e2f012 commit 7a35cde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions support/mainLoops.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,15 @@ func MainLoops() {
****************************/
go func() {
time.Sleep(time.Minute)
if cfg.Local.Options.AutoUpdate == false {
return
}

for glob.ServerRunning {
time.Sleep(time.Second * time.Duration(rand.Intn(300))) //Add 5 minutes of randomness
if cfg.Local.Options.AutoUpdate == false {
return
}
time.Sleep(time.Minute * 30)
fact.CheckFactUpdate(false)
}
Expand Down

0 comments on commit 7a35cde

Please sign in to comment.