fix failing to send peaks data when connecting
This commit is contained in:
parent
f1fe9d02e4
commit
a458038075
4
app.js
4
app.js
@ -21,7 +21,7 @@ var networkVersions = [];
|
|||||||
var graphData = [];
|
var graphData = [];
|
||||||
var highestPlayerCount = {};
|
var highestPlayerCount = {};
|
||||||
var lastGraphPush = [];
|
var lastGraphPush = [];
|
||||||
var graphPeaks = [];
|
var graphPeaks = {};
|
||||||
|
|
||||||
function pingAll() {
|
function pingAll() {
|
||||||
for (var i = 0; i < servers.length; i++) {
|
for (var i = 0; i < servers.length; i++) {
|
||||||
@ -251,7 +251,7 @@ function startServices() {
|
|||||||
client.emit('historyGraph', graphData);
|
client.emit('historyGraph', graphData);
|
||||||
|
|
||||||
// Send current peaks, if any
|
// Send current peaks, if any
|
||||||
if (graphPeaks.length > 0) {
|
if (Object.keys(graphPeaks).length > 0) {
|
||||||
client.emit('peaks', graphPeaks);
|
client.emit('peaks', graphPeaks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user