feat 修改代理配置

This commit is contained in:
timerzz 2024-12-04 19:32:57 +08:00
parent f3d77b5816
commit ab2c85f42f

View File

@ -78,11 +78,11 @@ func (p *ProxyPool) Update() {
}
// CronUpdate 定时更新
func (p *ProxyPool) CronUpdate(ctx context.Context, interval time.Duration) {
if interval == 0 {
interval = time.Minute * 30
func (p *ProxyPool) CronUpdate(ctx context.Context) {
if p.cfg.Interval == 0 {
p.cfg.Interval = time.Minute * 30
}
ticker := time.NewTicker(interval)
ticker := time.NewTicker(p.cfg.Interval)
defer ticker.Stop()
for {
select {