0.3.1 had missing emit 'socket' so that base will know when mqtt module is listening to broker
parent
f5fde15007
commit
af93f278e0
|
@ -1,3 +1,4 @@
|
||||||
/node_modules/
|
/node_modules/
|
||||||
*.lock
|
*.lock
|
||||||
/archive/
|
/archive/
|
||||||
|
/.yalc/
|
||||||
|
|
|
@ -4,3 +4,4 @@ test/
|
||||||
testing/
|
testing/
|
||||||
archive/
|
archive/
|
||||||
example/
|
example/
|
||||||
|
.yalc
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@uci/mqtt",
|
"name": "@uci/mqtt",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"description": "mqtt client with UCI json packet payloads",
|
"description": "mqtt client with UCI json packet payloads",
|
||||||
"main": "src",
|
"main": "src",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -272,7 +272,11 @@ class MQTTClient extends EventEmitter {
|
||||||
return payload
|
return payload
|
||||||
}
|
}
|
||||||
_listen() {
|
_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))
|
this.mqtt.on('message', messageProcess.bind(this))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue