diff --git a/adapter/outboundgroup/loadbalance.go b/adapter/outboundgroup/loadbalance.go index 99e11c46..9f609fbb 100644 --- a/adapter/outboundgroup/loadbalance.go +++ b/adapter/outboundgroup/loadbalance.go @@ -194,7 +194,7 @@ func strategyStickySessions(url string) strategyFn { key := utils.MapHash(getKeyWithSrcAndDst(metadata)) length := len(proxies) idx, has := lruCache.Get(key) - if !has { + if !has || idx >= length { idx = int(jumpHash(key+uint64(time.Now().UnixNano()), int32(length))) }