totemofwolf commented on a change in pull request #1150: feature: Support 
password auth for plugin limit-count-redis
URL: https://github.com/apache/incubator-apisix/pull/1150#discussion_r382908214
 
 

 ##########
 File path: lua/apisix/plugins/limit-count/limit-count-redis.lua
 ##########
 @@ -51,6 +51,20 @@ function _M.incoming(self, key)
         return false, err
     end
 
+    local count
+    count, err = red:get_reused_times()
+    if 0 == count then
+        if conf.redis_password and conf.redis_password ~= '' then
+            local ok, err = red:auth(conf.redis_password)
+            if not ok then
+                return nil, err
+            end
+        end
+    elseif err then
+        -- core.log.info(" err: ", err)
 
 Review comment:
   > return nil, err
   
   OK

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to