Fix: a shared fastSingle.Do() may cause providers untouched (#2378)

This commit is contained in:
wwqgtxx
2022-11-04 13:11:01 +08:00
committed by GitHub
parent c8bc11d61d
commit 19b7c7f52a
4 changed files with 16 additions and 10 deletions

View File

@ -78,9 +78,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) {
@ -205,9 +204,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) {