|
|
|
@ -74,7 +74,7 @@ func (s *ZkClient) GetConnsRemote(serviceName string) (conns []resolver.Address,
|
|
|
|
|
func (s *ZkClient) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error) {
|
|
|
|
|
s.logger.Printf("get conns from client, serviceName: %s", serviceName)
|
|
|
|
|
s.lock.Lock()
|
|
|
|
|
// defer s.lock.Unlock()
|
|
|
|
|
defer s.lock.Unlock()
|
|
|
|
|
opts = append(s.options, opts...)
|
|
|
|
|
conns := s.localConns[serviceName]
|
|
|
|
|
if len(conns) == 0 {
|
|
|
|
|