mirror of
https://github.com/vale981/doccam-pi
synced 2025-03-05 09:21:40 -05:00
fix
This commit is contained in:
parent
8b7b999a6f
commit
9bbb21678c
1 changed files with 6 additions and 4 deletions
10
main.js
10
main.js
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue