Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -18,8 +18,8 @@ exports.mqttOn = async (hosting, func) => { | ... | @@ -18,8 +18,8 @@ exports.mqttOn = async (hosting, func) => { |
18 | 18 | ||
19 | client.on('message', async (topic, message, packet) => { | 19 | client.on('message', async (topic, message, packet) => { |
20 | const result = await func(topic, message.toString()); | 20 | const result = await func(topic, message.toString()); |
21 | - this.mqttPublishMessage(client, result); | ||
22 | console.log('\x1b[1;32msubscribe : topic', topic, 'message : ', message.toString(), '\x1b[0m'); | 21 | console.log('\x1b[1;32msubscribe : topic', topic, 'message : ', message.toString(), '\x1b[0m'); |
22 | + this.mqttPublishMessage(client, result); | ||
23 | }); | 23 | }); |
24 | 24 | ||
25 | return client; | 25 | return client; | ... | ... |
-
Please register or login to post a comment