fix: client crash from barrel task early return in waitForAny
Same bug as the manager: CLIENT_BARREL_NAME == '' caused return inside parallel.waitForAny, killing all tasks instantly. Replace with infinite sleep when barrel is unconfigured.
This commit is contained in:
@@ -1395,7 +1395,9 @@ local function main()
|
||||
|
||||
-- Task 5: Client barrel auto-sort (sends to master only when barrel has items)
|
||||
function()
|
||||
if CLIENT_BARREL_NAME == "" then return end
|
||||
if CLIENT_BARREL_NAME == "" then
|
||||
while true do sleep(3600) end
|
||||
end
|
||||
log.info("INIT", "Client barrel: %s", CLIENT_BARREL_NAME)
|
||||
while true do
|
||||
local barrel = peripheral.wrap(CLIENT_BARREL_NAME)
|
||||
|
||||
Reference in New Issue
Block a user