Skip to content
Snippets Groups Projects
Commit 949a4fd2 authored by LaurenceLiZhixin's avatar LaurenceLiZhixin
Browse files

fix: add constructed required protocol limitation

parent b771ef24
No related branches found
No related tags found
No related merge requests found
......@@ -188,8 +188,9 @@ func (dir *RegistryDirectory) refreshAllInvokers(events []*registry.ServiceEvent
for _, event := range addEvents {
logger.Debugf("registry update, result{%s}", event)
logger.Infof("selector add service url{%s}", event.Service)
// FIXME: routers are built in every address notification?
dir.configRouters()
if constant.ROUTER_PROTOCOL == event.Service.Protocol {
dir.configRouters()
}
if oldInvoker, _ := dir.doCacheInvoker(event.Service); oldInvoker != nil {
oldInvokers = append(oldInvokers, oldInvoker)
}
......@@ -242,7 +243,9 @@ func (dir *RegistryDirectory) cacheInvokerByEvent(event *registry.ServiceEvent)
case remoting.EventTypeAdd, remoting.EventTypeUpdate:
logger.Infof("selector add service url{%s}", event.Service)
// FIXME: routers are built in every address notification?
dir.configRouters()
if constant.ROUTER_PROTOCOL == u.Protocol {
dir.configRouters()
}
return dir.cacheInvoker(u), nil
case remoting.EventTypeDel:
logger.Infof("selector delete service url{%s}", event.Service)
......
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