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

Commit

Permalink
Really fixed LevelUp concurrent storePacket issue.
Browse files Browse the repository at this point in the history
Closes #160.
  • Loading branch information
mcollina committed Jun 26, 2014
1 parent 6cb1339 commit f9f4cca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/persistence/levelup.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ LevelUpPersistence.prototype.updateOfflinePacket = function(client, messageId, n
};

LevelUpPersistence.prototype._storePacket = function(client, packet, cb) {
var key = util.format("%s:%s:%d", client, new Date().toISOString(), Math.floor(Math.random * 2048));
var key = util.format("%s:%s:%d", client, new Date().toISOString(), Math.floor(Math.random() * 2048));
var ttl = {
ttl: this.options.ttl.subscriptions
};
Expand Down

0 comments on commit f9f4cca

Please sign in to comment.