sessionstore
Advanced tools
Comparing version 1.3.4 to 1.3.5
@@ -208,9 +208,12 @@ var util = require('util'), | ||
if (sess._hash) { | ||
if (!this.options.ignoreConcurrency && sess._hash) { | ||
query._hash = sess._hash; | ||
} | ||
sess._hash = new ObjectID().toString(); | ||
if (!this.options.ignoreConcurrency) sess._hash = new ObjectID().toString(); | ||
this.sessions.update(query, sess, { upsert: true, safe: true }, function(err, modifiedCount) { | ||
if (err && err.message && err.message.indexOf('duplicate key') > -1) { | ||
return callback(new Error('ConcurrencyError: Session was updated by someone else!')); | ||
} | ||
if (modifiedCount && modifiedCount.result && modifiedCount.result.n === 0) { | ||
@@ -217,0 +220,0 @@ return callback(new Error('ConcurrencyError: Session was updated by someone else!')); |
{ | ||
"author": "adrai", | ||
"name": "sessionstore", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -1,2 +0,5 @@ | ||
### [v1.3.4](https://github.com/adrai/sessionstore/compare/v1.3.3...v1.3.44) | ||
### [v1.3.5](https://github.com/adrai/sessionstore/compare/v1.3.4...v1.3.5) | ||
- mongodb: add ignoreConcurrency flag | ||
### [v1.3.4](https://github.com/adrai/sessionstore/compare/v1.3.3...v1.3.4) | ||
- upgrade versions of lodash and async [#51](https://github.com/adrai/sessionstore/pull/51) thanks to [andrefbsantos](https://github.com/andrefbsantos) | ||
@@ -3,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46181
1140