Move ping handling into a separate method
This commit is contained in:
parent
2c7526e442
commit
4bc9d9b5ae
12
app.js
12
app.js
@ -30,6 +30,15 @@ function pingAll() {
|
|||||||
res.favicon = config.faviconOverride[network.name];
|
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 = {
|
var networkSnapshot = {
|
||||||
info: {
|
info: {
|
||||||
name: network.name,
|
name: network.name,
|
||||||
@ -106,9 +115,6 @@ function pingAll() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
})(servers[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start our main loop that does everything.
|
// Start our main loop that does everything.
|
||||||
|
Loading…
Reference in New Issue
Block a user