This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch improve/3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git

commit 0afb51f8d110317d6756c09c65212bbffcb9e0d5
Author: AlexStocks <[email protected]>
AuthorDate: Sun Oct 31 23:27:37 2021 +0800

    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 5b4958d..e4265e5 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 a7b16b4..68908ab 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 457e3cd..46bfd45 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() {}

Reply via email to