From 0afb51f8d110317d6756c09c65212bbffcb9e0d5 Mon Sep 17 00:00:00 2001 From: AlexStocks Date: Sun, 31 Oct 2021 23:27:37 +0800 Subject: [PATCH] delete useless codes --- cluster/cluster/base/cluster_invoker.go | 6 ++---- cluster/cluster_impl/import.go | 2 -- filter/filter_impl/import.go | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cluster/cluster/base/cluster_invoker.go b/cluster/cluster/base/cluster_invoker.go index 5b4958d753..e4265e5314 100644 --- a/cluster/cluster/base/cluster_invoker.go +++ b/cluster/cluster/base/cluster_invoker.go @@ -155,11 +155,9 @@ func (invoker *ClusterInvoker) doSelectInvoker(lb loadbalance.LoadBalance, invoc } return reselectedInvoker } - } else { - return selectedInvoker } - logger.Errorf("all %d invokers is unavailable for %s.", len(invokers), selectedInvoker.GetURL().String()) - return nil + + return selectedInvoker } func isInvoked(selectedInvoker protocol.Invoker, invoked []protocol.Invoker) bool { diff --git a/cluster/cluster_impl/import.go b/cluster/cluster_impl/import.go index a7b16b4d40..68908ab6e2 100644 --- a/cluster/cluster_impl/import.go +++ b/cluster/cluster_impl/import.go @@ -30,5 +30,3 @@ import ( _ "dubbo.apache.org/dubbo-go/v3/cluster/cluster/forking" _ "dubbo.apache.org/dubbo-go/v3/cluster/cluster/zoneaware" ) - -func init() {} diff --git a/filter/filter_impl/import.go b/filter/filter_impl/import.go index 457e3cdde6..46bfd45dde 100644 --- a/filter/filter_impl/import.go +++ b/filter/filter_impl/import.go @@ -36,5 +36,3 @@ import ( _ "dubbo.apache.org/dubbo-go/v3/filter/tps" _ "dubbo.apache.org/dubbo-go/v3/filter/tracing" ) - -func init() {}