Domain Name Expiry Notification for https monitor only

This commit is contained in:
Louis Lam 2022-04-16 15:01:53 +08:00
parent 30e113755e
commit 566133e350
2 changed files with 4 additions and 2 deletions

View File

@ -105,7 +105,7 @@ exports.mqttAsync = function (hostname, topic, okMessage, options = {}) {
log.debug("mqtt", "MQTT timeout triggered");
client.end();
reject("Timeout");
}, interval * 1000);
}, interval * 1000 * 0.8);
log.debug("mqtt", "MQTT connecting");
@ -121,6 +121,8 @@ exports.mqttAsync = function (hostname, topic, okMessage, options = {}) {
try {
client.subscribe(topic);
} catch (e) {
client.end();
clearTimeout(timeoutID);
reject(new Error("Cannot subscribe topic"));
}
});

View File

@ -172,7 +172,7 @@
<h2 v-if="monitor.type !== 'push'" class="mt-5 mb-2">{{ $t("Advanced") }}</h2>
<div class="my-3 form-check">
<div v-if="monitor.type === 'http' || monitor.type === 'keyword' " class="my-3 form-check">
<input id="expiry-notification" v-model="monitor.expiryNotification" class="form-check-input" type="checkbox">
<label class="form-check-label" for="expiry-notification">
{{ $t("Domain Name Expiry Notification") }}