monkeyDluffy6017 commented on code in PR #9663:
URL: https://github.com/apache/apisix/pull/9663#discussion_r1258246551
##########
apisix/plugins/limit-conn/init.lua:
##########
@@ -108,27 +109,29 @@ function _M.decrease(conf, ctx)
return
end
- for i = 1, #limit_conn, 4 do
- local lim = limit_conn[i]
- local key = limit_conn[i + 1]
- local delay = limit_conn[i + 2]
- local use_delay = limit_conn[i + 3]
-
- local latency
- if not use_delay then
- if ctx.proxy_passed then
- latency = ctx.var.upstream_response_time
- else
- latency = ctx.var.request_time - delay
+ if is_http then
Review Comment:
You shouldn't pass the whole following code, the `lim:leaving` is needed to
reduce the count, just pass the code below
```
if ctx.proxy_passed then
latency = ctx.var.upstream_response_time
else
latency = ctx.var.request_time - delay
end
```
--
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]