diff --git a/node/statusbot.js b/node/statusbot.js index 70efa66..af33c52 100644 --- a/node/statusbot.js +++ b/node/statusbot.js @@ -1,4 +1,3 @@ -var _u = require("underscore"); var express = require('express'), app = express(), server = require('http').createServer(app), @@ -46,7 +45,7 @@ snmpMac.on('done', function (res) { ippoll.on('doneCount', function (num) { simpleanswer.count = num; simpleanswer.lastchange = new Date(); - io.sockets.emit('sdata', { data: simpleanswer }); + ippoll.pollState(); }); ippoll.on('doneState', function (state) { @@ -65,7 +64,6 @@ io.configure(function () { function work() { snmpMac.poll(); ippoll.pollCount(); - ippoll.pollState(); // simpleanswer.names.length = 0; // for(var i=0;i<4+Math.random() * 100;i++) {