You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/06 06:33:05 UTC
[GitHub] [apisix] leslie-tsang commented on a diff in pull request #7196: perf: reuse ctx in ssl phase
leslie-tsang commented on code in PR #7196:
URL: https://github.com/apache/apisix/pull/7196#discussion_r889859404
##########
apisix/init.lua:
##########
@@ -806,14 +806,14 @@ end
function _M.stream_ssl_phase()
local ngx_ctx = ngx.ctx
- local api_ctx = ngx_ctx.api_ctx
-
- if api_ctx == nil then
- api_ctx = core.tablepool.fetch("api_ctx", 0, 32)
- ngx_ctx.api_ctx = api_ctx
- end
+ local api_ctx = core.tablepool.fetch("api_ctx", 0, 32)
+ ngx_ctx.api_ctx = api_ctx
Review Comment:
Seems we can remove this if `ngx_ctx.api_ctx` will eventually be assigned as `nil` ?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org