Skip to content
Snippets Groups Projects
Commit ad2d6ed7 authored by cadeeper's avatar cadeeper
Browse files

fix bug: pathMap cache need to delete after node removed

parent 22107248
No related branches found
No related tags found
No related merge requests found
...@@ -301,6 +301,9 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen ...@@ -301,6 +301,9 @@ func (l *ZkEventListener) listenDirEvent(conf *common.URL, zkPath string, listen
go func(zkPath string, listener remoting.DataListener) { go func(zkPath string, listener remoting.DataListener) {
if l.listenServiceNodeEvent(zkPath) { if l.listenServiceNodeEvent(zkPath) {
listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel}) listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel})
l.pathMapLock.Lock()
delete(l.pathMap, zkPath)
l.pathMapLock.Unlock()
} }
logger.Warnf("listenSelf(zk path{%s}) goroutine exit now", zkPath) logger.Warnf("listenSelf(zk path{%s}) goroutine exit now", zkPath)
}(dubboPath, listener) }(dubboPath, listener)
......
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