Skip to content

Commit

Permalink
解决冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyang committed Jul 3, 2020
2 parents d824897 + a9f0762 commit b0d22e8
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 @@ -53,8 +54,9 @@ 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); // 如果没有Invoker抛出异常
String methodName = RpcUtils.getMethodName(invocation);
// 获取该方法的最大重试次
int len = getUrl().getMethodParameter(invocation.getMethodName(), Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1;
int len = getUrl().getMethodParameter(methodName, Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1;
if (len <= 0) {
len = 1;
}
Expand Down

0 comments on commit b0d22e8

Please sign in to comment.