diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-10-17 03:48:08 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-10-17 03:48:08 +0200 |
commit | daf11b64a93f88a17dab8e67a54e7d6235118a59 (patch) | |
tree | 624c0a3b477691a1514d0aed4e9fcbaa6331b585 | |
parent | sfive nginx-lua plugin works now (diff) |
fixed error handling for log cleanup thread
-rw-r--r-- | src/daq/nginx-lua/s5-nginx-log.lua | 6 |
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 |