diff --git a/implement/weight_round_robin.go b/implement/weight_round_robin.go index 63b7b26..ed8c88e 100644 --- a/implement/weight_round_robin.go +++ b/implement/weight_round_robin.go @@ -27,7 +27,7 @@ func (w *WeightRoundRobin) Get(nodeList []*define.SeverNode) (*define.SeverNode, // 计算总权重 for _, node := range nodeList { node.CurrentWeight = node.CurrentWeight + node.EffectiveWeight // 每个节点的当前权重 - totalWeight += node.Weight + totalWeight += node.EffectiveWeight // 总权重是有效权重的累加. 配置的权重只是初始权重 if nil == selectedNode { selectedNode = node } else {