修改集群结点配置自己身的结点名称,导致rpc call失败

This commit is contained in:
boyce
2019-03-20 13:39:42 +08:00
parent ffe2e967f8
commit 671159cc87
3 changed files with 22 additions and 9 deletions

View File

@@ -221,8 +221,8 @@ func (slf *CCluster) Call(NodeServiceMethod string, args interface{}, reply inte
var callServiceName string
nodeidList := slf.GetNodeList(NodeServiceMethod, &callServiceName)
if len(nodeidList) > 1 || len(nodeidList) < 1 {
service.GetLogger().Printf(sysmodule.LEVER_ERROR, "CCluster.Call(%s) not find nodes.", NodeServiceMethod)
return fmt.Errorf("CCluster.Call(%s) not find nodes.", NodeServiceMethod)
service.GetLogger().Printf(sysmodule.LEVER_ERROR, "CCluster.Call(%s) find nodes count %d is error.", NodeServiceMethod, len(nodeidList))
return fmt.Errorf("CCluster.Call(%s) find nodes count %d is error.", NodeServiceMethod, len(nodeidList))
}
nodeid := nodeidList[0]