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)
|
-- Task 5: Client barrel auto-sort (sends to master only when barrel has items)
|
||||||
function()
|
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)
|
log.info("INIT", "Client barrel: %s", CLIENT_BARREL_NAME)
|
||||||
while true do
|
while true do
|
||||||
local barrel = peripheral.wrap(CLIENT_BARREL_NAME)
|
local barrel = peripheral.wrap(CLIENT_BARREL_NAME)
|
||||||
|
|||||||
Reference in New Issue
Block a user