Skip to content

Commit

Permalink
Merge 16c85a7 into dde5951
Browse files Browse the repository at this point in the history
  • Loading branch information
amer8 committed Jun 3, 2019
2 parents dde5951 + 16c85a7 commit 77a3f2e
Show file tree
Hide file tree
Showing 3 changed files with 359 additions and 400 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_js:
- "10"
- "12"
after_success: npm run coverage

9 changes: 4 additions & 5 deletions lib/init.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

const _ = require('busyman')
const debug = require('debug')('mqtt-node:init')
const reporter = require('./reporter')
const msgHandlers = require('./msg_handlers')
Expand Down Expand Up @@ -99,7 +97,7 @@ module.exports = function (qn) {
const isReadable = so.isReadable(oid, iid, rid)
let dataToCheck

if (_.isFunction(opt)) {
if (typeof opt === 'function') {
callback = opt
opt = undefined
}
Expand All @@ -121,7 +119,7 @@ module.exports = function (qn) {
const isReadable = so.isReadable(oid, iid, rid)
let dataToCheck

if (_.isFunction(opt)) {
if (typeof opt === 'function') {
callback = opt
opt = undefined
}
Expand All @@ -140,7 +138,8 @@ module.exports = function (qn) {

debug('Set up LWMQN interfaces')

_.forEach(['register', 'deregister', 'schedule', 'notify', 'update', 'ping'], (intf) => {
const eventList = [ 'register', 'deregister', 'schedule', 'notify', 'update', 'ping' ]
eventList.forEach((intf) => {
qn._pubics[intf] = `${intf}/${qn.clientId}`
qn._subics[intf] = `${intf}/response/${qn.clientId}`
})
Expand Down

0 comments on commit 77a3f2e

Please sign in to comment.