Skip to content

Commit

Permalink
Revert "#12615"
Browse files Browse the repository at this point in the history
This reverts commit ccfe663.
  • Loading branch information
tohidemyname committed Jul 6, 2023
1 parent ccfe663 commit 5176760
Showing 1 changed file with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,7 @@ protected Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, Load
}
}
}
Invoker<T> invoker = invokers.iterator().next();
try {
return invoker.invoke(invocation);
} catch (RpcException e) {
if (e.isNoInvokerAvailableAfterFilter()) {
log.debug("No available provider for service" + getUrl().getServiceKey() + " on group " + invoker.getUrl().getParameter(GROUP_KEY) + ", will continue to try another group.");
} else {
throw e;
}
}
return invokers.iterator().next().invoke(invocation);
}

Class<?> returnType;
Expand All @@ -97,15 +88,7 @@ protected Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, Load
for (final Invoker<T> invoker : invokers) {
RpcInvocation subInvocation = new RpcInvocation(invocation, invoker);
subInvocation.setAttachment(ASYNC_KEY, "true");
try {
results.put(invoker.getUrl().getServiceKey(), invoker.invoke(subInvocation));
} catch (RpcException e) {
if (e.isNoInvokerAvailableAfterFilter()) {
log.debug("No available provider for service" + getUrl().getServiceKey() + " on group " + invoker.getUrl().getParameter(GROUP_KEY) + ", will continue to try another group.");
} else {
throw e;
}
}
results.put(invoker.getUrl().getServiceKey(), invoker.invoke(subInvocation));
}

Object result = null;
Expand Down

0 comments on commit 5176760

Please sign in to comment.