mirror of
https://github.com/kepler155c/opus
synced 2025-01-27 15:44:46 +00:00
allow up to 10 sec diff in connect time due to clock mismatch in dims
This commit is contained in:
parent
0545ff0c68
commit
a0d47a5f1a
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user