7974c74d by jabis

timer fix

1 parent 93993793
Showing 1 changed file with 5 additions and 5 deletions
...@@ -90,19 +90,19 @@ ...@@ -90,19 +90,19 @@
90 //console.log(req) 90 //console.log(req)
91 io = require('socket.io').listen(server); 91 io = require('socket.io').listen(server);
92 } 92 }
93 io.of(config.path).on('connection', (socket) => { 93 io.of(config.path).on('connection', (socket) => {
94 socket.emit('start', config.spans); 94 socket.emit('start', config.spans);
95 socket.on('change', function() { 95 socket.on('change', function() {
96 socket.emit('start', config.spans); 96 socket.emit('start', config.spans);
97 }); 97 });
98 }); 98
99
100 config.spans.forEach((span) => { 99 config.spans.forEach((span) => {
101 span.os = []; 100 span.os = [];
102 span.responses = []; 101 span.responses = [];
103 setInterval(() => gatherOsMetrics(io, span), span.interval * 1000); 102 setInterval(() => gatherOsMetrics(socket, span), span.interval * 1000);
104 }); 103 });
105 104
105 });
106 106
107 const startTime = process.hrtime(); 107 const startTime = process.hrtime();
108 if (req.path === config.path) { 108 if (req.path === config.path) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!