Skip to content

Commit 56d90c7

Browse files
committed
Session Present flag is needed while handling connect event
1 parent 627521d commit 56d90c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ MqttClient.prototype._handleConnack = function (packet) {
667667
clearTimeout(this.connackTimer);
668668

669669
if (0 === rc) {
670-
this.emit('connect');
670+
this.emit('connect', null, {sessionPresent: packet.sessionPresent});
671671
} else if (0 < rc) {
672672
this.emit('error',
673673
new Error('Connection refused: ' + errors[rc]));

0 commit comments

Comments
 (0)