Skip to content

Commit 9a2ab9b

Browse files
hossinasaadiyuhan6665
authored andcommitted
fix roundRobin
1 parent 2fc4b31 commit 9a2ab9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/router/balancing.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package router
22

33
import (
44
"context"
5+
reflect "reflect"
56
sync "sync"
67

78
"github.com/xtls/xray-core/common/dice"
@@ -49,7 +50,7 @@ func (s *RoundRobinStrategy) PickOutbound(tags []string) string {
4950
if len(tags) == 0 {
5051
panic("0 tags")
5152
}
52-
if s.roundRobin == nil {
53+
if s.roundRobin == nil || !reflect.DeepEqual(s.roundRobin.tags, tags) {
5354
s.roundRobin = NewRoundRobin(tags)
5455
}
5556
tag := s.roundRobin.NextTag()

0 commit comments

Comments
 (0)