diff --git a/config/Environment Variables.go b/config/Environment Variables.go index 8b7b7e1..56514c7 100644 --- a/config/Environment Variables.go +++ b/config/Environment Variables.go @@ -108,6 +108,7 @@ var EnvList []*EnvVar = []*EnvVar{ // **Required**: No // // The interval in minutes between proxy checks. Defaults to 480 minutes (8 hours) if not set. + // You can disable this by setting the value to 0. Then, proxies will only be checked once at server initialization. }, } diff --git a/config/proxy_checker.go b/config/proxy_checker.go index 1633eb4..785bd8f 100644 --- a/config/proxy_checker.go +++ b/config/proxy_checker.go @@ -34,7 +34,12 @@ func StartProxyChecker() { return default: checkProxies() - time.Sleep(GlobalServerConfig.ProxyCheckInterval) + if t := GlobalServerConfig.ProxyCheckInterval; t > 0 { + time.Sleep(t) + } else { + log.Println("Proxy check interval set to 0, disabling auto-check from now on.") + select {} // Sweet dreams! + } } } }()