From 515c9b638996838b6eb89482321418ded06aaa52 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 4 Dec 2019 08:14:59 +1000 Subject: Report the timeout differently, the other was a hack that caused problems. --- apt-panopticon-report-email-web.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-panopticon-report-email-web.lua') diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 9e9d818..3f2f257 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua @@ -169,7 +169,7 @@ local status = function(host, results, typ) local e = 0 local w = 0 local s = nil ~= mirrors[host].Protocols[typ] - local to = false + local to = results.timeout if ('http' ~= typ) and ('https' ~= typ) and ('ftp' ~= typ) and ('rsync' ~= typ) then s = true end if nil ~= results[typ] then e = results[typ].errors @@ -188,8 +188,8 @@ local status = function(host, results, typ) for i, u in pairs(v) do if "table" == type(u) then if typ == i then - if 0 <= u.errors then e = e + u.errors else to = true end - if 0 <= u.warnings then w = w + u.warnings else to = true end + if 0 <= u.errors then e = e + u.errors end + if 0 <= u.warnings then w = w + u.warnings end end end end @@ -262,7 +262,7 @@ local collate = function(host, ip, results) end end end - else + elseif "timeout" ~= k then local a = results[k] if nil == a then a = 0 end results[k] = a + v -- cgit v1.1