优化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

@@ -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 {