ing
This commit is contained in:
parent
4a4a6a7efa
commit
7c24503032
|
@ -25,9 +25,15 @@ type GatewayRPCServletHandlers struct {
|
|||
}
|
||||
|
||||
func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, requestCodec protocol.RegistryCodec) (result interface{}, err error) {
|
||||
var (
|
||||
grpcResult string
|
||||
method string
|
||||
params []string
|
||||
)
|
||||
|
||||
defer func() {
|
||||
if nil != err {
|
||||
logging.Logger().Errorf("Gateway Websocket: Inovke error %v", err)
|
||||
logging.Logger().Errorf("Gateway Websocket: Method[%s] Params[%v] Inovke error %v", method, params, err)
|
||||
}
|
||||
|
||||
if !requestCodec.HasResponse() {
|
||||
|
@ -49,17 +55,13 @@ func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, reque
|
|||
|
||||
grpcCTX := metadata.NewOutgoingContext(context.Background(), md.(metadata.MD))
|
||||
|
||||
var (
|
||||
grpcResult string
|
||||
params []string
|
||||
)
|
||||
|
||||
method = requestCodec.Method()
|
||||
params, err = requestCodec.Params()
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
grpcResult, err = grpc.Exec(grpcCTX, requestCodec.Method(), params)
|
||||
grpcResult, err = grpc.Exec(grpcCTX, method, params)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user