diff --git a/src/configurations/quickjs/async-mqtt.js b/src/configurations/quickjs/async-mqtt.js index 636c4ebaaca9f1c2258b8ea444831a5c312eefe3..481e65b3eae2997dd473a3be0971e9d9eab18a72 100644 --- a/src/configurations/quickjs/async-mqtt.js +++ b/src/configurations/quickjs/async-mqtt.js @@ -18,13 +18,10 @@ class AsyncClient { protobuf.Root.prototype.fetch = function (filename, callback) { os.setTimeout(function () { const data = std.loadFile(filename); - if (data === null) { - console.log("failed to load file: " + filename); + if (data === null) callback(new Error("failed to load file: " + filename)); - } else { - //console.log(`data loaded for ${filename}`) + else callback(null, data); - } }, 0); }; } @@ -81,7 +78,6 @@ class AsyncClient { // there is no erro handling in paho mqtt this.client.onConnectionLost = function (responseObject) { callback(responseObject); - console.log("USP Disconnected: ", responseObject.errorMessage); }; } }