0.3.1 had missing emit 'socket' so that base will know when mqtt module is listening to broker

master
David Kebler 2020-03-15 17:00:19 -07:00
parent f5fde15007
commit af93f278e0
4 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/node_modules/
*.lock
/archive/
/.yalc/

View File

@ -4,3 +4,4 @@ test/
testing/
archive/
example/
.yalc

View File

@ -1,6 +1,6 @@
{
"name": "@uci/mqtt",
"version": "0.3.0",
"version": "0.3.1",
"description": "mqtt client with UCI json packet payloads",
"main": "src",
"scripts": {

View File

@ -272,7 +272,11 @@ class MQTTClient extends EventEmitter {
return payload
}
_listen() {
log.debug({method:'_listen', line:147, msg:`listening for incoming mqtt packets from broker on topics ${this.topics}`})
const msg = `listening for incoming mqtt packets from broker on topics ${this.topics}`
log.debug({method:'_listen', line:147, msg:msg})
this.emit('socket',{state:'listening', msg:msg})
this.mqtt.on('message', messageProcess.bind(this))