Fix proto
This commit is contained in:
parent
372203d033
commit
048e393827
@ -314,13 +314,18 @@ function waitForJob()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
rednet.open("bottom")
|
rednet.open("bottom")
|
||||||
rednet.broadcast("gibjob", "jobs")
|
local retrying = false
|
||||||
while true do
|
while true do
|
||||||
sender, message, proto = rednet.receive("newjob", 1)
|
rednet.broadcast("gibjob", "jobs")
|
||||||
|
sender, message, proto = rednet.receive("newjob", 2)
|
||||||
if message then
|
if message then
|
||||||
job = tonumber(message)
|
job = tonumber(message)
|
||||||
print("Received job "..tostring(job))
|
print("Received job "..tostring(job))
|
||||||
return job
|
return job
|
||||||
|
else
|
||||||
|
if not retrying then
|
||||||
|
print("No job received. I will keep retrying.")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user