Skip to content
Snippets Groups Projects
Commit 02b986bb authored by pantianying's avatar pantianying
Browse files

fix bug

parent ec1eff9f
No related branches found
No related tags found
No related merge requests found
......@@ -435,6 +435,7 @@ func (r *zkRegistry) Subscribe(url *common.URL, notifyListener registry.NotifyLi
for {
if serviceEvent, err := listener.Next(); err != nil {
logger.Warnf("Selector.watch() = error{%v}", perrors.WithStack(err))
listener.Close()
break
} else {
......@@ -454,8 +455,8 @@ func (r *zkRegistry) getListener(conf *common.URL) (*RegistryConfigurationListen
r.listenerLock.Lock()
if r.configListener.isClosed {
return nil, perrors.New("configListener already been closed")
r.listenerLock.Unlock()
return nil, perrors.New("configListener already been closed")
}
zkListener = r.configListener
r.listenerLock.Unlock()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment