fix: sticky-sessions may not be effective

This commit is contained in:
xishang0128 2024-10-12 08:26:37 +08:00
parent 4437c8861c
commit ca3f1ebae6

View File

@ -204,7 +204,7 @@ func strategyStickySessions(url string) strategyFn {
for i := 1; i < maxRetry; i++ {
proxy := proxies[nowIdx]
if proxy.AliveForTestUrl(url) {
if nowIdx != idx {
if !has || nowIdx != idx {
lruCache.Set(key, nowIdx)
}