优化rpc错误返回

This commit is contained in:
boyce
2020-12-23 10:32:12 +08:00
parent 417538e2b4
commit ab4635c6c7
2 changed files with 1 additions and 4 deletions

View File

@@ -559,7 +559,6 @@ func (handler *RpcHandler) CastGo(serviceMethod string,args interface{}) {
handler.goRpc(nil,true,0,serviceMethod,args)
}
//RawGoNode(rpcProcessorType RpcProcessorType,nodeId int,serviceName string,rpcMethodId uint32,args IRawInputArgs) error
func (handler *RpcHandler) RawGoNode(rpcProcessorType RpcProcessorType,nodeId int,rpcMethodId uint32,serviceName string,args IRawInputArgs) error {
processor := GetProcessor(uint8(rpcProcessorType))
var pClientList [maxClusterNode]*Client

View File

@@ -81,12 +81,10 @@ func (server *Server) Start(listenAddr string) {
func (agent *RpcAgent) OnDestroy() {}
func (agent *RpcAgent) WriteResponse(processor IRpcProcessor,serviceMethod string,seq uint64,reply interface{},err RpcError) {
func (agent *RpcAgent) WriteResponse(processor IRpcProcessor,serviceMethod string,seq uint64,reply interface{},rpcError RpcError) {
var mReply []byte
var rpcError RpcError
var errM error
if reply!=nil {
mReply,errM = processor.Marshal(reply)
if errM != nil {