
                disconnect();
                return;
            }

            received++;

            latency = now - timestamp;
            latencies.push(latency);
            if (latencies.length > run_length) {
                latencies.shift();
            }
            ltotal   += latency;
            laverage  = ltotal / received;
            lrunning  = 0;
            for (var i=0; i < latencies.length; i++) {
                lrunning += latencies[i];
            }
            lrunning  = lrunn