aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mirror-checker.lua
diff options
context:
space:
mode:
authoronefang2019-11-05 00:09:36 +1000
committeronefang2019-11-05 00:09:36 +1000
commitff4ff768499579065a311df745fccc3f3163a333 (patch)
treea10461b71b16e5037e447032fa4c153658ab2036 /mirror-checker.lua
parentAdd the round robin stuff to the mirrors.lua, and jiggle the code that loops ... (diff)
downloadapt-panopticon-ff4ff768499579065a311df745fccc3f3163a333.zip
apt-panopticon-ff4ff768499579065a311df745fccc3f3163a333.tar.gz
apt-panopticon-ff4ff768499579065a311df745fccc3f3163a333.tar.bz2
apt-panopticon-ff4ff768499579065a311df745fccc3f3163a333.tar.xz
TODO minor tweaks.
Diffstat (limited to '')
-rwxr-xr-xmirror-checker.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua
index 3da8bc6..aea816e 100755
--- a/mirror-checker.lua
+++ b/mirror-checker.lua
@@ -258,7 +258,6 @@ checkHEAD = function (host, URL, r, retry)
258 if nil == p then 258 if nil == p then
259 E(" " .. c .. " " .. s .. "! " .. check .. " " .. host .. " -> " .. URL, PU.scheme, host) 259 E(" " .. c .. " " .. s .. "! " .. check .. " " .. host .. " -> " .. URL, PU.scheme, host)
260 -- So far the only errors are "timeout", "Network is unreachable", and "closed", and I suspect "closed" is due to saturating my bandwidth. 260 -- So far the only errors are "timeout", "Network is unreachable", and "closed", and I suspect "closed" is due to saturating my bandwidth.
261 -- Might be worthwhile retrying those, some number of times.
262 if "timeout" == c then timeouts = timeouts + 1 end 261 if "timeout" == c then timeouts = timeouts + 1 end
263 if ("closed" == c) or ("Network is unreachable" == c) or ("timeout" == c) then checkHEAD(host, URL, r, retry + 1, timeouts) end 262 if ("closed" == c) or ("Network is unreachable" == c) or ("timeout" == c) then checkHEAD(host, URL, r, retry + 1, timeouts) end
264 else 263 else
@@ -434,7 +433,7 @@ local getMirrors = function ()
434 elseif "Active" == t and nil == d:find("yes", 1, true) then 433 elseif "Active" == t and nil == d:find("yes", 1, true) then
435 W("Mirror " .. host .. " is not active - " .. d) 434 W("Mirror " .. host .. " is not active - " .. d)
436 active = false 435 active = false
437-- TODO - Should do some input validation on BaseURL. 436-- TODO - Should do some input validation on BaseURL, and everything else.
438 else 437 else
439 m[t] = d 438 m[t] = d
440 end 439 end