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