feat 修改代理配置
This commit is contained in:
parent
f3d77b5816
commit
ab2c85f42f
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user