Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
start () {
this.mqtt = aedes({
persistence: aedesPersistenceLevel(level(path.join(this.dataDir, '/db/broker.db')))
});
this.server = createServer(this.mqtt.handle);
dispatcher.on('ready', () => {
pauseable.resume(this.mqtt);
});
this.mqtt.on('client', (client) => {
log.debug(`${client.id} connected to MQTT`);
});
this.mqtt.on('clientDisconnect', (client) => {
log.debug(`${client.id} disconnected from MQTT`);
});