mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-11 04:54:42 +08:00
优化rpc错误返回
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user