From 8597d1c96e6816820996bfb756f2d86feeebc98b Mon Sep 17 00:00:00 2001 From: boyce Date: Fri, 25 Sep 2020 19:50:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DRPC=E9=99=84=E5=8A=A0?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E5=8F=82=E6=95=B0=E8=A7=A3=E6=9E=90=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=87=BA=E9=94=99=E6=97=B6=E7=9B=B4=E6=8E=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- network/processor/pbprocessor.go | 2 +- rpc/rpchandler.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/network/processor/pbprocessor.go b/network/processor/pbprocessor.go index 8bf6c79..af8800d 100644 --- a/network/processor/pbprocessor.go +++ b/network/processor/pbprocessor.go @@ -92,7 +92,7 @@ func (slf *PBProcessor ) Marshal(msg interface{}) ([]byte, error){ var err error if pMsg.msg!=nil { - pMsg.rawMsg,err = proto.Marshal(pMsg.msg.(proto.Message)) + pMsg.rawMsg,err = proto.Marshal(pMsg.msg) if err != nil { return nil,err } diff --git a/rpc/rpchandler.go b/rpc/rpchandler.go index 7f19479..0798f08 100644 --- a/rpc/rpchandler.go +++ b/rpc/rpchandler.go @@ -245,6 +245,7 @@ func (slf *RpcHandler) HandlerRpcRequest(request *RpcRequest) { if request.requestHandle!=nil { request.requestHandle(nil, rerr) } + return } }else { if request.localRawParam!=nil { @@ -255,6 +256,7 @@ func (slf *RpcHandler) HandlerRpcRequest(request *RpcRequest) { if request.requestHandle!=nil { request.requestHandle(nil, rerr) } + return } }else { iparam = request.localParam