add variable for amount of retries for #6

This commit is contained in:
Izaya 2018-07-25 11:56:10 +10:00
parent 4aba85513a
commit a7b2d2c012
1 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,7 @@ local dbug = false
local modems = {}
local port = 4096
local retry = 10
local retrycount = 64
local route = true
--[[
@ -188,7 +189,7 @@ function start()
if v[5] < computer.uptime() then
dprint(k,v[1],v[2],hostname,v[3],v[4])
sendPacket(k,v[1],v[2],hostname,v[3],v[4])
if v[1] ~= 1 or v[6] == 255 then
if v[1] ~= 1 or v[6] == retrycount then
pqueue[k] = nil
else
pqueue[k][5]=computer.uptime()+retry
@ -223,6 +224,10 @@ function set_retry(sn)
retry = tonumber(sn) or 30
print("retry = "..tostring(retry))
end
function set_retrycount(sn)
retrycount = tonumber(sn) or 64
print("retrycount = "..tostring(retrycount))
end
function set_pctime(sn)
pctime = tonumber(sn) or 30
print("pctime = "..tostring(pctime))