Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Also persist QoS 0 subscriptions when clean flag false #694

Merged
merged 3 commits into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
removed comments
  • Loading branch information
mitsos1os committed Oct 27, 2017
commit 9d7c706165bc8b8cdfc6cc4dd12cc267d07be24f
2 changes: 0 additions & 2 deletions lib/persistence/levelup.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,8 @@ LevelUpPersistence.prototype.storeSubscriptions = function(client, done) {
if (!client.clean) {
// Issue #693
Object.keys(client.subscriptions).forEach(function(key) {
//if (client.subscriptions[key].qos > 0) { // Issue #693
subscriptions[key] = client.subscriptions[key];
subscriptions[key].ttl = that.options.ttl.subscriptions + now;
//} // Issue #693
});
this._clientSubscriptions.put(client.id, subscriptions, done);
Object.keys(subscriptions).forEach(function(key) {
Expand Down
2 changes: 0 additions & 2 deletions lib/persistence/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ RedisPersistence.prototype.storeSubscriptions = function(client, cb) {

// Issue #693
Object.keys(client.subscriptions).forEach(function(key) {
// if (client.subscriptions[key].qos > 0) { // Issue #693
subscriptions[key] = client.subscriptions[key];
//} // Issue #693
});

this._client.get(clientSubKey, function(err, currentSubs){
Expand Down