@ -359,9 +359,11 @@ class Monitor extends BeanModel {
});
bean.status = UP;
} catch (error) {
if (error.message !== "Timeout") {
bean.status = DOWN;
bean.msg = error.message;
}
} else {
bean.msg = "Unknown Monitor Type";
bean.status = PENDING;
@ -131,6 +131,7 @@ exports.mqttAsync = function (hostname, topic, okMessage, options = {}) {
setTimeout(() => {
client.end();
reject("Timeout");
}, interval * 1000);