mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-09-07 18:02:42 +00:00
added timeout for removing the dead loop state
This commit is contained in:
parent
227bbdea2f
commit
22256dfcd2
@ -359,9 +359,11 @@ class Monitor extends BeanModel {
|
|||||||
});
|
});
|
||||||
bean.status = UP;
|
bean.status = UP;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (error.message !== "Timeout") {
|
||||||
bean.status = DOWN;
|
bean.status = DOWN;
|
||||||
bean.msg = error.message;
|
bean.msg = error.message;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
bean.msg = "Unknown Monitor Type";
|
bean.msg = "Unknown Monitor Type";
|
||||||
bean.status = PENDING;
|
bean.status = PENDING;
|
||||||
|
@ -131,6 +131,7 @@ exports.mqttAsync = function (hostname, topic, okMessage, options = {}) {
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
client.end();
|
client.end();
|
||||||
|
reject("Timeout");
|
||||||
}, interval * 1000);
|
}, interval * 1000);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user