Skip to content

Commit

Permalink
fix apache#6369, Consumer cant set correct retries via generic invoca…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
joelzhoujun committed Jun 24, 2020
1 parent 59320a9 commit 8b9783e
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -28,6 +28,7 @@
import com.alibaba.dubbo.rpc.RpcException;
import com.alibaba.dubbo.rpc.cluster.Directory;
import com.alibaba.dubbo.rpc.cluster.LoadBalance;
import com.alibaba.dubbo.rpc.support.RpcUtils;

import java.util.ArrayList;
import java.util.HashSet;
Expand All @@ -54,7 +55,8 @@ public FailoverClusterInvoker(Directory<T> directory) {
public Result doInvoke(Invocation invocation, final List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
List<Invoker<T>> copyinvokers = invokers;
checkInvokers(copyinvokers, invocation);
int len = getUrl().getMethodParameter(invocation.getMethodName(), Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1;
String methodName = RpcUtils.getMethodName(invocation);
int len = getUrl().getMethodParameter(methodName, Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1;
if (len <= 0) {
len = 1;
}
Expand Down

0 comments on commit 8b9783e

Please sign in to comment.