Move ping handling into a separate method

This commit is contained in:
Cryptkeeper 2015-12-26 14:21:20 -06:00
parent 2c7526e442
commit 4bc9d9b5ae

12
app.js

@ -30,6 +30,15 @@ function pingAll() {
res.favicon = config.faviconOverride[network.name];
}
handlePing(network, res, err);
});
})(servers[i]);
}
}
// This is where the result of a ping is feed.
// This stores it and converts it to ship to the frontend.
function handlePing(network, res, err) {
var networkSnapshot = {
info: {
name: network.name,
@ -106,9 +115,6 @@ function pingAll() {
});
}
}
});
})(servers[i]);
}
}
// Start our main loop that does everything.