allow up to 10 sec diff in connect time due to clock mismatch in dims

This commit is contained in:
kepler155c@gmail.com 2018-11-24 21:45:10 -05:00
parent 0545ff0c68
commit a0d47a5f1a
2 changed files with 8 additions and 1 deletions

View File

@ -48,6 +48,13 @@ function Point.copy(pt)
return { x = pt.x, y = pt.y, z = pt.z }
end
function Point.round(pt)
pt.x = Util.round(pt.x)
pt.y = Util.round(pt.y)
pt.z = Util.round(pt.z)
return pt
end
function Point.same(pta, ptb)
return pta.x == ptb.x and
pta.y == ptb.y and

View File

@ -172,7 +172,7 @@ local function trusted(msg, port)
local data = Crypto.decrypt(msg.t or '', pubKey)
--local sharedKey = modexp(pubKey, exchange.secretKey, public.primeMod)
return data.ts and tonumber(data.ts) and math.abs(os.time() - data.ts) < 1
return data.ts and tonumber(data.ts) and math.abs(os.time() - data.ts) < 10
end
end