mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 11:23:32 +02:00
fix roundRobin
This commit is contained in:
parent
2fc4b31fcf
commit
9a2ab9b6a3
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package router
|
|||
|
||||
import (
|
||||
"context"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
"github.com/xtls/xray-core/common/dice"
|
||||
|
@ -49,7 +50,7 @@ func (s *RoundRobinStrategy) PickOutbound(tags []string) string {
|
|||
if len(tags) == 0 {
|
||||
panic("0 tags")
|
||||
}
|
||||
if s.roundRobin == nil {
|
||||
if s.roundRobin == nil || !reflect.DeepEqual(s.roundRobin.tags, tags) {
|
||||
s.roundRobin = NewRoundRobin(tags)
|
||||
}
|
||||
tag := s.roundRobin.NextTag()
|
||||
|
|
Loading…
Reference in a new issue