This commit is contained in:
Lucas Pleß 2013-10-23 01:49:08 +02:00
parent db915edefc
commit d988d3a995
1 changed files with 1 additions and 3 deletions

View File

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