From f9ac90f572e8df605d0baef7707c4c62a43b6d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sat, 24 May 2025 13:49:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9D=83=E9=87=8D=E7=AD=96?= =?UTF-8?q?=E7=95=A5BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- implement/weight_round_robin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {