fix: group filter touch provider

This commit is contained in:
adlyq
2022-06-07 17:19:25 +08:00
parent 2a4f2f3942
commit ed17a1bf23
6 changed files with 37 additions and 47 deletions

View File

@ -32,9 +32,7 @@ func (hc *HealthCheck) process() {
ticker := time.NewTicker(time.Duration(hc.interval) * time.Second)
go func() {
t := time.NewTicker(30 * time.Second)
<-t.C
t.Stop()
time.Sleep(30 * time.Second)
hc.check()
}()

View File

@ -84,9 +84,8 @@ func (pp *proxySetProvider) Proxies() []C.Proxy {
return pp.proxies
}
func (pp *proxySetProvider) ProxiesWithTouch() []C.Proxy {
func (pp *proxySetProvider) Touch() {
pp.healthCheck.touch()
return pp.Proxies()
}
func (pp *proxySetProvider) setProxies(proxies []C.Proxy) {
@ -178,9 +177,8 @@ func (cp *compatibleProvider) Proxies() []C.Proxy {
return cp.proxies
}
func (cp *compatibleProvider) ProxiesWithTouch() []C.Proxy {
func (cp *compatibleProvider) Touch() {
cp.healthCheck.touch()
return cp.Proxies()
}
func stopCompatibleProvider(pd *CompatibleProvider) {