diff --git a/cluster/loadbalance/leastactive/loadbalance.go b/cluster/loadbalance/leastactive/loadbalance.go index dc52011bee..5cc8ab62c2 100644 --- a/cluster/loadbalance/leastactive/loadbalance.go +++ b/cluster/loadbalance/leastactive/loadbalance.go @@ -94,7 +94,7 @@ func (lb *leastActiveLoadBalance) Select(invokers []protocol.Invoker, invocation } if leastCount == 1 { - return invokers[0] + return invokers[leastIndexes[0]] } if !sameWeight && totalWeight > 0 { diff --git a/go.mod b/go.mod index b63747cee1..ec98e50d40 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 github.com/dubbogo/gost v1.12.6-0.20220824084206-300e27e9e524 github.com/dubbogo/grpc-go v1.42.10 - github.com/dubbogo/triple v1.1.8 + github.com/dubbogo/triple v1.1.9 github.com/emicklei/go-restful/v3 v3.8.0 github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 github.com/fsnotify/fsnotify v1.5.4 diff --git a/go.sum b/go.sum index 8de537b7a2..2ddf498bab 100644 --- a/go.sum +++ b/go.sum @@ -180,8 +180,8 @@ github.com/dubbogo/grpc-go v1.42.10/go.mod h1:JMkPt1mIHL96GAFeYsMoMjew6f1ROKycik github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU= github.com/dubbogo/net v0.0.4/go.mod h1:1CGOnM7X3he+qgGNqjeADuE5vKZQx/eMSeUkpU3ujIc= github.com/dubbogo/triple v1.0.9/go.mod h1:1t9me4j4CTvNDcsMZy6/OGarbRyAUSY0tFXGXHCp7Iw= -github.com/dubbogo/triple v1.1.8 h1:yE+J3W1NTZCEPa1FoX+VWZH6UF1c0+A2MGfERlU2zbI= -github.com/dubbogo/triple v1.1.8/go.mod h1:9pgEahtmsY/avYJp3dzUQE8CMMVe1NtGBmUhfICKLJk= +github.com/dubbogo/triple v1.1.9 h1:U3ZDh9tyeitp/arSB5qR4wFnbK8MMYm/F4kzn6JokaA= +github.com/dubbogo/triple v1.1.9/go.mod h1:9pgEahtmsY/avYJp3dzUQE8CMMVe1NtGBmUhfICKLJk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=