Commit 2dc7c6c2 by Joneq

修改代码

parent d67fc4fa
Showing with 9 additions and 7 deletions
......@@ -48,17 +48,19 @@ if not ok then
end
if config.redis_auth ~= "" then
ok, err = red:auth(config.redis_auth)
local ok, err = red:auth(config.redis_auth)
-- 如果连接失败,跳转到label处
if not ok then
ngx.say("failed to connect: ", err)
ngx.exit(ngx.HTTP_FORBIDDEN)
return
end
end
-- 如果连接失败,跳转到label处
if not ok then
ngx.say("failed to connect: ", err)
ngx.exit(ngx.HTTP_FORBIDDEN)
return
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment