nic-6443 commented on code in PR #12872:
URL: https://github.com/apache/apisix/pull/12872#discussion_r2680934052


##########
apisix/plugins/limit-conn/util.lua:
##########
@@ -28,9 +28,20 @@ function _M.incoming(self, red, key, commit)
 
     local conn, err
     if commit then
-        conn, err = red:incrby(key, 1)
-        if not conn then
-            return nil, err
+        if self.conf.key_ttl then
+            red:init_pipeline()

Review Comment:
   I think using the pipeline is a bit too complicated. For limit-req, I 
support you continuing to use the additional `expire` call. In fact, my 
previous suggestion was only for limit-conn.



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