You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org> on 2023/06/27 12:55:54 UTC

[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9663: fix: bugfix of limit-conn plugin

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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org