mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-16 19:24:41 -05:00
removed extra logging
This commit is contained in:
parent
3f5133d1ba
commit
3306f4a8e0
@ -93,19 +93,12 @@ exports.pingAsync = function (hostname, ipv6 = false) {
|
|||||||
exports.mqttAsync = function (hostname, port = undefined, username = undefined, password = undefined, topic, okMessage) {
|
exports.mqttAsync = function (hostname, port = undefined, username = undefined, password = undefined, topic, okMessage) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
console.log({
|
|
||||||
hostname,
|
|
||||||
port,
|
|
||||||
username,
|
|
||||||
password
|
|
||||||
});
|
|
||||||
let client = mqtt.connect(hostname, {
|
let client = mqtt.connect(hostname, {
|
||||||
port,
|
port,
|
||||||
username,
|
username,
|
||||||
password
|
password
|
||||||
});
|
});
|
||||||
client.on("connect", () => {
|
client.on("connect", () => {
|
||||||
console.log(`Connected to ${hostname}:${port}, ${username}, ${password}`);
|
|
||||||
client.subscribe(topic);
|
client.subscribe(topic);
|
||||||
});
|
});
|
||||||
client.on("message", (messageTopic, message) => {
|
client.on("message", (messageTopic, message) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user