Skip to content

Commit

Permalink
fix roundRobin
Browse files Browse the repository at this point in the history
  • Loading branch information
hossinasaadi authored and yuhan6665 committed Jan 7, 2024
1 parent 2fc4b31 commit 9a2ab9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/router/balancing.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package router

import (
"context"
reflect "reflect"
sync "sync"

"github.com/xtls/xray-core/common/dice"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 9a2ab9b

Please sign in to comment.