Merge pull request #623 from ChihChienKung/master

at.NTS never been found
This commit is contained in:
Mark Nadal 2018-10-09 09:58:21 -07:00 committed by GitHub
commit 5be08a08ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
nts.js
View File

@ -37,8 +37,8 @@
NTS.end = Gun.state();
Gun.obj.del(ask, ack);
NTS.latency = (NTS.end - NTS.start)/2;
if(!at.NTS){ return }
NTS.calc = NTS.latency + at.NTS;
if(!at.nts && !at.NTS){ return }
NTS.calc = NTS.latency + (at.NTS || at.nts);
Gun.state.drift -= (NTS.end - NTS.calc)/2;
setTimeout(ping, 1000);
}