mirror of
https://github.com/vale981/doccam-pi
synced 2025-03-04 17:01: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) {
|
||||
callback(true);
|
||||
}).on("error", function(e) {
|
||||
if (e.message == "socket hang up")
|
||||
callback(true)
|
||||
else
|
||||
if (e.message == "socket hang up") {
|
||||
setTimeout(function () {
|
||||
callback(true);
|
||||
}, 1000);
|
||||
} else
|
||||
callback(false);
|
||||
});
|
||||
}
|
||||
|
@ -231,7 +233,7 @@ var commandHandlers = function commandHandlers(command, cb) {
|
|||
},
|
||||
changeSettings: function() {
|
||||
for (let set in command.data) {
|
||||
if (config[set])
|
||||
if (typeof config[set] !== 'undefined')
|
||||
config[set] = command.data[set];
|
||||
}
|
||||
let oldConfigured;
|
||||
|
|
Loading…
Add table
Reference in a new issue