This commit is contained in:
psihius committed 2018-04-19 23:33:27 +03:00
commit bf9886d7ee
2 files changed
+20 -13

No files matched your search

+2 -3
View File
@@ -638,7 +638,7 @@ function instanceManagement() {
hash: modHashes[i].hash,
}
needle.post(config.masterIP + ":" + config.masterPort + '/api/checkMod', payload, function (err, response, body) {
if(err) throw err // Unable to contact master server! Please check your config.json.
if(err) console.log(new Error("Unable to contact master server! Please check your config.json."));
if(response && body && body == "found") {
console.log("master has mod");
} else if (response && body && typeof body == "string") {
@@ -649,8 +649,7 @@ function instanceManagement() {
// response.body is a string which is a modName.zip
var req = request.post("http://"+config.masterIP + ":" + config.masterPort + '/api/uploadMod', function (err, resp, body) {
if (err) {
console.log('Error!');
throw err
console.log(new Error("Unable to contact master server! Please check your config.json."));
} else {
console.log('URL: ' + body);
}