diff --git a/inferium-harvester.lua b/inferium-harvester.lua index 8ce9e1c..a49bd3f 100644 --- a/inferium-harvester.lua +++ b/inferium-harvester.lua @@ -280,15 +280,19 @@ local function fetchRemotePlan() local replyMessage, errMessage = net.sendQuery(INFERIUM_SERVER, message, NETWORK_TIMEOUT) if replyMessage and replyMessage.payload then previouslyFetchedRemotePlan = replyMessage.payload + print('> plan fetched') return replyMessage.payload elseif previouslyFetchedRemotePlan then - print('> failed to fetch remote plan, use the previous one instead') + print('> failed to fetch: ' .. tostring(errMessage)) + print('> use the previous recorded remote plan instead') return previouslyFetchedRemotePlan elseif not replyMessage and errMessage then if lastErrMessage ~= errMessage then lastErrMessage = errMessage print('> failed to fetch: ' .. tostring(errMessage)) end + else + error('unknown error during fetch') end os.sleep(IDLE_TIME)