mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
优化原始RPC跨进程调用
This commit is contained in:
@@ -250,7 +250,7 @@ func (handler *RpcHandler) HandlerRpcRequest(request *RpcRequest) {
|
|||||||
log.Error(err)
|
log.Error(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
v(request.inputArgs.GetRawData())
|
v(request.RpcRequestData.GetInParam())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ func (agent *RpcAgent) Run() {
|
|||||||
|
|
||||||
//交给程序处理
|
//交给程序处理
|
||||||
serviceMethod := strings.Split(req.RpcRequestData.GetServiceMethod(),".")
|
serviceMethod := strings.Split(req.RpcRequestData.GetServiceMethod(),".")
|
||||||
if len(serviceMethod)!=2 {
|
if len(serviceMethod) < 1 {
|
||||||
rpcError := RpcError("rpc request req.ServiceMethod is error")
|
rpcError := RpcError("rpc request req.ServiceMethod is error")
|
||||||
agent.WriteResponse(processor,req.RpcRequestData.GetServiceMethod(),req.RpcRequestData.GetSeq(),nil,rpcError)
|
agent.WriteResponse(processor,req.RpcRequestData.GetServiceMethod(),req.RpcRequestData.GetSeq(),nil,rpcError)
|
||||||
ReleaseRpcRequest(req)
|
ReleaseRpcRequest(req)
|
||||||
|
|||||||
Reference in New Issue
Block a user