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 定时更新 // CronUpdate 定时更新
func (p *ProxyPool) CronUpdate(ctx context.Context, interval time.Duration) { func (p *ProxyPool) CronUpdate(ctx context.Context) {
if interval == 0 { if p.cfg.Interval == 0 {
interval = time.Minute * 30 p.cfg.Interval = time.Minute * 30
} }
ticker := time.NewTicker(interval) ticker := time.NewTicker(p.cfg.Interval)
defer ticker.Stop() defer ticker.Stop()
for { for {
select { select {