Properly handle pushing graph data for new networks
This commit is contained in:
parent
047f9306bb
commit
7d2814156e
4
app.js
4
app.js
@ -105,6 +105,10 @@ function handlePing(network, res, err) {
|
|||||||
// Don't have too much data!
|
// Don't have too much data!
|
||||||
util.trimOldPings(graphData);
|
util.trimOldPings(graphData);
|
||||||
|
|
||||||
|
if (!graphData[network.ip]) {
|
||||||
|
graphData[network.ip] = [];
|
||||||
|
}
|
||||||
|
|
||||||
graphData[network.ip].push([timeMs, res ? res.players.online : 0]);
|
graphData[network.ip].push([timeMs, res ? res.players.online : 0]);
|
||||||
|
|
||||||
// Send the update.
|
// Send the update.
|
||||||
|
Loading…
Reference in New Issue
Block a user