From 535f6dbd238976730f0cf7ed6a10df080f62eba2 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 23 Mar 2018 17:18:08 +0900 Subject: [PATCH] ing --- internal/server/rpc/gateway_rpc_servlet_handlers.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/server/rpc/gateway_rpc_servlet_handlers.go b/internal/server/rpc/gateway_rpc_servlet_handlers.go index 4cf870b..08b5a6c 100644 --- a/internal/server/rpc/gateway_rpc_servlet_handlers.go +++ b/internal/server/rpc/gateway_rpc_servlet_handlers.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" + "git.loafle.net/commons_go/logging" "git.loafle.net/commons_go/rpc" "git.loafle.net/commons_go/rpc/gateway" "git.loafle.net/commons_go/rpc/protocol" @@ -24,7 +25,7 @@ type GatewayRPCServletHandlers struct { } func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, requestCodec protocol.RegistryCodec) (result interface{}, err error) { - defer func () { + defer func() { if nil != err { logging.Logger().Errorf("Gateway Websocket: Inovke error %v", err) } @@ -33,7 +34,7 @@ func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, reque result = nil err = nil } - } + }() md := servletCTX.GetAttribute(oogw.GRPCMetadataKey) if nil == md { @@ -49,7 +50,7 @@ func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, reque var ( grpcResult string - params []string + params []string ) params, err = requestCodec.Params() @@ -65,7 +66,7 @@ func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, reque if !requestCodec.HasResponse() { return } - + err = json.Unmarshal([]byte(grpcResult), &result) if err != nil { return