We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6c2595 commit 70adb15Copy full SHA for 70adb15
lib/mqtt.js
@@ -48,8 +48,14 @@ Cayenne.prototype.connect = function(callback) {
48
return callback(null, self.client);
49
});
50
51
+ this.client.on('close', function () {
52
+ self.emit("disconnect");
53
+ });
54
+
55
this.client.on('message', self.onMessage.bind(self));
56
57
58
59
const cmdTopic = apiVersion + '/:username/'+THINGS+'/:thingId/cmd/:channel';
60
Router.addRoute(cmdTopic, this.handleCommand.bind(this));
61
0 commit comments