File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ local _M = {
5353}
5454
5555
56+ -- use a new ctxs table to make LuaJIT JIT compiler happy to generate more
57+ -- efficient machine code.
58+ local ctxs = {}
59+ registry .ngx_lua_ctx_tables = ctxs
60+
61+
5662local get_ctx_table
5763do
5864 local in_ssl_phase = ffi .new (" int[1]" )
7076 error (" no request ctx found" )
7177 end
7278
73- local ctxs = registry .ngx_lua_ctx_tables
7479 if ctx_ref < 0 then
7580 ctx_ref = ssl_ctx_ref [0 ]
7681 if ctx_ref > 0 and ctxs [ctx_ref ] then
@@ -129,7 +134,6 @@ local function set_ctx_table(ctx)
129134 error (" no request ctx found" )
130135 end
131136
132- local ctxs = registry .ngx_lua_ctx_tables
133137 if ctx_ref < 0 then
134138 ctx_ref = ref_in_table (ctxs , ctx )
135139 ngx_lua_ffi_set_ctx_ref (r , ctx_ref )
You can’t perform that action at this time.
0 commit comments