mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
More informative error when master is unavailable
This commit is contained in:
1 parent
7682a51437
commit
36ccf22e02
1 file changed
+3
-1
@@ -730,7 +730,9 @@ function instanceManagement() {
|
||||
// get inventory from Master and RCON it to our slave
|
||||
setInterval(function () {
|
||||
needle.get(config.masterIP + ":" + config.masterPort + '/api/inventory', function (err, response, body) {
|
||||
if (response && response.body) {
|
||||
if(err){
|
||||
console.log("Unable to get JSON master/api/inventory, master might be unaccessible");
|
||||
} else if (response && response.body) {
|
||||
// Take the inventory we (hopefully) got and turn it into the format LUA accepts
|
||||
try {
|
||||
var inventory = JSON.parse(response.body);
|
||||
|
||||
Reference in new issue
Block a user