diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-10-19 00:42:49 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-10-19 00:42:49 +0200 |
commit | 71ca67ca1aa99493d436c8a167bcfabe1eac2053 (patch) | |
tree | 13fcc60a955fa81140db2f3bb153363162d66230 /src/daq | |
parent | daq: nginx lua aggregated files into one (diff) |
fixed fetch error handling
Diffstat (limited to 'src/daq')
-rw-r--r-- | src/daq/nginx-lua/s5-nginx.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/daq/nginx-lua/s5-nginx.lua b/src/daq/nginx-lua/s5-nginx.lua index 475a576..13925c5 100644 --- a/src/daq/nginx-lua/s5-nginx.lua +++ b/src/daq/nginx-lua/s5-nginx.lua @@ -123,7 +123,8 @@ function _SFIVE.fetch() local ok, err = ngx.say(sfive_data:get(k)) if not ok then ngx.log(ngx.ERR, "SFive(fetch): failed to send data set: ", err) - break + lock:unlock("fetch") + return end sfive_data:delete(k) end @@ -141,10 +142,7 @@ function _SFIVE.fetch() end ngx.sleep(0.1) end - ok, err = lock:unlock("fetch") - if not ok then - ngx.log(ngx.ERR, "SFive(fetch): unlock error: " .. err) - end + lock:unlock("fetch") end end |