Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pantianying committed Dec 1, 2019
1 parent d978b86 commit ec0209d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion registry/zookeeper/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
Expand Down

0 comments on commit ec0209d

Please sign in to comment.