diff --git a/app.js b/app.js index 8db2b1d..61f9c5b 100644 --- a/app.js +++ b/app.js @@ -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 });