From 3b9cc6166967b157298132c0c26a90018da326fa Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 17 Aug 2022 11:27:56 +0800 Subject: [PATCH] update orgnization after update user --- pkg/grpc-etcdv3/getcdv3/resolver.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/grpc-etcdv3/getcdv3/resolver.go b/pkg/grpc-etcdv3/getcdv3/resolver.go index b72df5fc9..6e0b39256 100644 --- a/pkg/grpc-etcdv3/getcdv3/resolver.go +++ b/pkg/grpc-etcdv3/getcdv3/resolver.go @@ -96,6 +96,16 @@ func GetConn(schema, etcdaddr, serviceName string, operationID string) *grpc.Cli return r.grpcClientConn } +func GetDefaultConn(schema, etcdaddr, serviceName string, operationID string) *grpc.ClientConn { + conn := GetConn(schema, etcdaddr, serviceName, operationID) + if conn != nil { + log.NewWarn(operationID, utils.GetSelfFuncName(), schema, etcdaddr, serviceName, "conn is nil") + return conn + } + conn = GetConfigConn(serviceName, operationID) + return conn +} + func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { if r.cli == nil { return nil, fmt.Errorf("etcd clientv3 client failed, etcd:%s", target)