This is an automated email from the ASF dual-hosted git repository.

membphis pushed a commit to branch test_reuse_ctx
in repository https://gitbox.apache.org/repos/asf/apisix.git

commit 1c9cf7671cb4f42c5b77da0d49dff2b5015407fd
Author: YuanSheng Wang <membp...@gmail.com>
AuthorDate: Fri Aug 12 15:36:26 2022 +0800

    test: make a try
---
 apisix/init.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/apisix/init.lua b/apisix/init.lua
index 17f1740ef..eb097c1e1 100644
--- a/apisix/init.lua
+++ b/apisix/init.lua
@@ -322,6 +322,10 @@ function _M.http_access_phase()
 
     -- always fetch table from the table pool, we don't need a reused api_ctx
     local api_ctx = core.tablepool.fetch("api_ctx", 0, 32)
+    if nkeys(api_ctx) != 0 then
+        error("hit the wrong case")
+        api_ctx = {}
+    end
     ngx_ctx.api_ctx = api_ctx
 
     if not verify_tls_client(api_ctx) then

Reply via email to