fixed bug

This commit is contained in:
cubedro 2015-06-17 04:10:27 +03:00
parent 4919ade848
commit 6c2df3f59c
1 changed files with 1 additions and 0 deletions

1
app.js
View File

@ -344,6 +344,7 @@ client.on('connection', function (clientSpark)
clientSpark.on('client-pong', function (data)
{
var serverTime = _.get(data, "serverTime", 0);
var latency = Math.ceil( (_.now() - data.serverTime) / 2 );
clientSpark.emit('client-latency', { latency: latency });