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