diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index 32f9fe7a293b9b93687dc46bdedc6c044421927a..912f8c266943c29119d7bd264af568f150d14cff 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -204,9 +204,7 @@ func (r *zkRegistry) registerTempZookeeperNode(root string, node string) error { zkPath string ) - r.cltLock.Lock() client := r.client - r.cltLock.Unlock() if client == nil { return perrors.New("zk Client is null, can not process registerTempZookeeperNode ") } @@ -260,9 +258,7 @@ func (r *zkRegistry) getListener(conf *common.URL) (*RegistryConfigurationListen zkListener = NewRegistryConfigurationListener(r.client, r, conf) if r.listener == nil { - r.cltLock.Lock() client := r.client - r.cltLock.Unlock() if client == nil { return nil, perrors.New("zk connection broken") }