-
-
Notifications
You must be signed in to change notification settings - Fork 507
Also persist QoS 0 subscriptions when clean flag false #694
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,10 +283,11 @@ RedisPersistence.prototype.storeSubscriptions = function(client, cb) { | |
var that = this; | ||
var subscriptions = {}; | ||
|
||
// Issue #693 | ||
Object.keys(client.subscriptions).forEach(function(key) { | ||
if (client.subscriptions[key].qos > 0) { | ||
subscriptions[key] = client.subscriptions[key]; | ||
} | ||
// if (client.subscriptions[key].qos > 0) { // Issue #693 | ||
subscriptions[key] = client.subscriptions[key]; | ||
//} // Issue #693 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you remove these comments? |
||
}); | ||
|
||
this._client.get(clientSubKey, function(err, currentSubs){ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -558,7 +558,7 @@ module.exports = function(create, buildOpts) { | |
}); | ||
}); | ||
|
||
it("should not store a QoS 0 subscription", function(done) { | ||
it("should store a QoS 0 subscription", function(done) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you please check/add a test that we are not enqueuing QoS 0 packets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you tell me what you mean? You already have test for QoS 0 packages There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. forget my comment :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eeeee... what comment???? ;) |
||
var instance = this.instance; | ||
var client = { | ||
id: "my client id - 42", | ||
|
@@ -573,7 +573,7 @@ module.exports = function(create, buildOpts) { | |
|
||
instance.storeSubscriptions(client, function() { | ||
instance.lookupSubscriptions(client, function(err, results) { | ||
expect(results).to.eql({}); | ||
expect(results).to.eql(client.subscriptions); | ||
done(); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove these comments?