spacewander commented on code in PR #7036:
URL: https://github.com/apache/apisix/pull/7036#discussion_r872491866
##########
apisix/stream/xrpc/runner.lua:
##########
@@ -27,6 +27,19 @@ local pcall = pcall
local ipairs = ipairs
local tostring = tostring
+
+core.ctx.register_var("rpc_time", function(ctx)
+ local session = ctx.xrpc_session
+ local curr_ctx_id = session._currr_ctx_id
+ local curr_ctx = session._ctxs[curr_ctx_id]
Review Comment:
@tzssangglass
The `register_var` doesn't rewrite the `ctx.var`. `ctx.var._ctx` will point
to the ctx passed via `set_vars_meta(ctx)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]