Clean up the connection cleanup code
This commit is contained in:
parent
8ea811add0
commit
5d4e325dd1
1 changed files with 6 additions and 3 deletions
|
|
@ -78,9 +78,12 @@ stream {
|
|||
# (during the "log" phase), which triggers only if the challenge
|
||||
# was passed.
|
||||
log_by_lua_block {
|
||||
local users = ngx.shared.users
|
||||
if ngx.var.bbs_challenge_passed == 1 then
|
||||
users:incr(active, -1, 1)
|
||||
if tonumber(ngx.var.bbs_challenge_passed) == 1 then
|
||||
local users = ngx.shared.users
|
||||
users:incr("active", -1, 1)
|
||||
-- For debugging, uncomment the following line. The output
|
||||
-- lands in nginx' error log file.
|
||||
-- ngx.log(ngx.ERR, "Currently active users: ", users:get("active"))
|
||||
end
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue