diff --git a/lib/node.js b/lib/node.js index e93a84e..83c676a 100644 --- a/lib/node.js +++ b/lib/node.js @@ -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) {