summaryrefslogtreecommitdiff
path: root/src/daq/nginx-lua
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-10-17 03:48:08 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-10-17 03:48:08 +0200
commitdaf11b64a93f88a17dab8e67a54e7d6235118a59 (patch)
tree624c0a3b477691a1514d0aed4e9fcbaa6331b585 /src/daq/nginx-lua
parentsfive nginx-lua plugin works now (diff)
fixed error handling for log cleanup thread
Diffstat (limited to 'src/daq/nginx-lua')
-rw-r--r--src/daq/nginx-lua/s5-nginx-log.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/daq/nginx-lua/s5-nginx-log.lua b/src/daq/nginx-lua/s5-nginx-log.lua
index c862343..daad0f4 100644
--- a/src/daq/nginx-lua/s5-nginx-log.lua
+++ b/src/daq/nginx-lua/s5-nginx-log.lua
@@ -57,10 +57,10 @@ end
local start_cleanup_thread = function(sfive)
local ok, err, force = sfive:add("log:cleanup_running", 1)
if not ok then
- if err == "exists" then
- return
+ if err ~= "exists" then
+ ngx.log(ngx.ERR, "SFive(log): failed to set cleanup_running flag: " .. err)
end
- ngx.log(ngx.ERR, "SFive(log): failed to set cleanup_running flag: " .. err)
+ return
end
ok, err = ngx.timer.at(cleanup_delay, log_cleanup)
if not ok then