fixed latency

This commit is contained in:
cubedro 2015-04-06 04:51:19 +03:00
parent 111b4a1bb0
commit 76b80a3ddb
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ function Node()
console.warn('We are scheduling a reconnect operation', opts);
})
.on('node-pong', function(data) {
var latency = (new Date()).getTime() - self._latency;
var latency = Math.ceil(((new Date()).getTime() - self._latency)/2);
socket.emit('latency', { id: self.id, latency: latency });
})
.on('data', function incoming(data) {