|
@ -534,9 +534,13 @@ func (wsc *wsConnection) readRoutine() { |
|
|
var args []reflect.Value |
|
|
var args []reflect.Value |
|
|
if rpcFunc.ws { |
|
|
if rpcFunc.ws { |
|
|
wsCtx := types.WSRPCContext{Request: request, WSRPCConnection: wsc} |
|
|
wsCtx := types.WSRPCContext{Request: request, WSRPCConnection: wsc} |
|
|
args, err = jsonParamsToArgsWS(rpcFunc, request.Params, wsCtx) |
|
|
|
|
|
|
|
|
if request.Params != nil { |
|
|
|
|
|
args, err = jsonParamsToArgsWS(rpcFunc, request.Params, wsCtx) |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
args, err = jsonParamsToArgsRPC(rpcFunc, request.Params) |
|
|
|
|
|
|
|
|
if request.Params != nil { |
|
|
|
|
|
args, err = jsonParamsToArgsRPC(rpcFunc, request.Params) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
wsc.WriteRPCResponse(types.RPCInternalError(request.ID, errors.Wrap(err, "Error converting json params to arguments"))) |
|
|
wsc.WriteRPCResponse(types.RPCInternalError(request.ID, errors.Wrap(err, "Error converting json params to arguments"))) |
|
|