Commit 5997a3a0 authored by Marek Vavrusa's avatar Marek Vavrusa

modules/daf: cleanup, proper ws closing

parent 964e8f25
......@@ -218,11 +218,9 @@ $(function() {
const tok = input.split(' ');
if (dafg.action[tok[0].toLowerCase()]) {
$('#daf-add').focus();
$(this).close();
} else if(dafComplete(this)) {
/* No more rules after query is complete. */
item.remove();
$(this).close();
}
},
createFilter: function (input) {
......
......@@ -255,11 +255,12 @@ local function publish(h, ws)
end
-- Update counters when there is a new data
if next(update) ~= nil then
ws:send(tojson(update))
ok = ws:send(tojson(update))
else
ok = ws:send_ping()
end
cqueues.sleep(2)
cqueues.sleep(1)
end
ws:close()
end
-- @function Configure module
......
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 to comment