This commit is contained in:
Hiro Protagonist 2016-09-09 12:47:46 +12:00
parent 8b7b999a6f
commit 9bbb21678c

10
main.js
View file

@ -179,9 +179,11 @@ function isReachable(host, port, callback) {
}, function(res) { }, function(res) {
callback(true); callback(true);
}).on("error", function(e) { }).on("error", function(e) {
if (e.message == "socket hang up") if (e.message == "socket hang up") {
callback(true) setTimeout(function () {
else callback(true);
}, 1000);
} else
callback(false); callback(false);
}); });
} }
@ -231,7 +233,7 @@ var commandHandlers = function commandHandlers(command, cb) {
}, },
changeSettings: function() { changeSettings: function() {
for (let set in command.data) { for (let set in command.data) {
if (config[set]) if (typeof config[set] !== 'undefined')
config[set] = command.data[set]; config[set] = command.data[set];
} }
let oldConfigured; let oldConfigured;