monkeyDluffy6017 commented on code in PR #9663:
URL: https://github.com/apache/apisix/pull/9663#discussion_r1243690201


##########
apisix/plugins/limit-conn/init.lua:
##########
@@ -119,7 +119,11 @@ function _M.decrease(conf, ctx)
             if ctx.proxy_passed then
                 latency = ctx.var.upstream_response_time
             else
-                latency = ctx.var.request_time - delay
+                if ctx.var.request_time ~= nil then
+                    latency = ctx.var.request_time - delay
+                else
+                    latency = ctx.var.upstream_response_time

Review Comment:
   The stream module doesn't have the `upstream_response_time` variable too



-- 
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]

Reply via email to