提交 3c6ee32e 编写于 作者: K ken.lj

Fixed #946, route rule should always run when changed, but should only run at...

Fixed #946, route rule should always run when changed, but should only run at every invoke when RUNTIME_KEY is true.
上级 b9782070
......@@ -75,7 +75,7 @@ public abstract class AbstractDirectory<T> implements Directory<T> {
if (localRouters != null && localRouters.size() > 0) {
for (Router router : localRouters) {
try {
if (router.getUrl() == null || router.getUrl().getParameter(Constants.RUNTIME_KEY, true)) {
if (router.getUrl() != null && router.getUrl().getParameter(Constants.RUNTIME_KEY, false)) {
invokers = router.route(invokers, getConsumerUrl(), invocation);
}
} catch (Throwable t) {
......
......@@ -446,7 +446,7 @@ public class RegistryDirectory<T> extends AbstractDirectory<T> implements Notify
List<Router> routers = getRouters();
if (routers != null) {
for (Router router : routers) {
if (router.getUrl() != null && !router.getUrl().getParameter(Constants.RUNTIME_KEY, true)) {
if (router.getUrl() != null) {
invokers = router.route(invokers, getConsumerUrl(), invocation);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册