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

fix problem

parent 128d4842
No related branches found
No related tags found
No related merge requests found
......@@ -124,20 +124,19 @@ func (dir *registryDirectory) refreshInvokers(res *registry.ServiceEvent) {
url = nil
//TODO: router
}
switch res.Action {
case remoting.EventTypeAdd, remoting.EventTypeUpdate:
//dir.cacheService.EventTypeAdd(res.Path, dir.serviceTTL)
dir.cacheInvoker(url)
case remoting.EventTypeDel:
//dir.cacheService.EventTypeDel(res.Path, dir.serviceTTL)
dir.uncacheInvoker(url)
logger.Infof("selector delete service url{%s}", res.Service)
default:
return
}
}
switch res.Action {
case remoting.EventTypeAdd, remoting.EventTypeUpdate:
//dir.cacheService.EventTypeAdd(res.Path, dir.serviceTTL)
dir.cacheInvoker(&res.Service)
case remoting.EventTypeDel:
//dir.cacheService.EventTypeDel(res.Path, dir.serviceTTL)
dir.uncacheInvoker(&res.Service)
logger.Infof("selector delete service url{%s}", res.Service)
default:
return
}
dir.cacheInvoker(url)
newInvokers := dir.toGroupInvokers()
dir.listenerLock.Lock()
defer dir.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