mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-21 04:04:43 +08:00
1.优化pending存储结构,支持超时判断
2.protobuf与json支持临时内存池
This commit is contained in:
@@ -75,12 +75,14 @@ func (agent *RpcAgent) WriteRespone(serviceMethod string,seq uint64,reply interf
|
||||
var rpcResponse RpcResponse
|
||||
rpcResponse.RpcResponeData = processor.MakeRpcResponse(seq,rpcError,mReply)
|
||||
bytes,errM := processor.Marshal(rpcResponse.RpcResponeData)
|
||||
defer processor.ReleaseRpcRespose(rpcResponse.RpcResponeData)
|
||||
|
||||
if errM != nil {
|
||||
log.Error("service method %s %+v Marshal error:%+v!", serviceMethod,rpcResponse,errM)
|
||||
return
|
||||
}
|
||||
|
||||
processor.ReleaseRpcRespose(rpcResponse.RpcResponeData)
|
||||
|
||||
errM = agent.conn.WriteMsg(bytes)
|
||||
if errM != nil {
|
||||
log.Error("Rpc %s return is error:%+v",serviceMethod,errM)
|
||||
|
||||
Reference in New Issue
Block a user