handle errors in update sensibly

This commit is contained in:
2020-08-23 22:28:27 +01:00
parent 178caa2f5c
commit d2e582beda
2 changed files with 4 additions and 3 deletions

View File

@@ -1546,7 +1546,8 @@ return function(...)
if not http then return "Seriously? Why no HTTP?" end
while true do
-- do updates here
install(false)
local ok, err = pcall(install, false)
if not ok then add_log("update error %s", err) end
-- Spread out updates a bit to reduce load on the server.
sleep(300 + (os.getComputerID() % 100) - 50)