sessionstore
Advanced tools
Comparing version 1.2.10 to 1.2.11
@@ -133,15 +133,28 @@ 'use strict'; | ||
this.client.index({ | ||
var self = this; | ||
this.client.exists({ | ||
index: this.index, | ||
type: this.typeName, | ||
id: this.options.prefix + sid, | ||
// version: sess._version > 2 ? sess._version - 1 : undefined, | ||
ttl: ttl + 'ms', | ||
body: sess, | ||
refresh: true | ||
}, function (err, res) { | ||
if (err && (err.message.toLowerCase().indexOf('version') >= 0)) { | ||
return callback(new Error('ConcurrencyError: Session was updated by someone else!')); | ||
id: this.options.prefix + sid | ||
}, function (err, exists) { | ||
var methodName = undefined; | ||
if (!exists) { | ||
methodName = 'create'; | ||
} | ||
callback(err, res); | ||
self.client.index({ | ||
index: self.index, | ||
type: self.typeName, | ||
id: self.options.prefix + sid, | ||
opType: methodName, | ||
// version: sess._version > 2 ? sess._version - 1 : undefined, | ||
ttl: ttl + 'ms', | ||
body: sess, | ||
refresh: true | ||
}, function (err, res) { | ||
if (err && (err.message.toLowerCase().indexOf('version') >= 0)) { | ||
return callback(new Error('ConcurrencyError: Session was updated by someone else!')); | ||
} | ||
callback(err, res); | ||
}); | ||
}); | ||
@@ -148,0 +161,0 @@ }, |
{ | ||
"author": "adrai", | ||
"name": "sessionstore", | ||
"version": "1.2.10", | ||
"version": "1.2.11", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -0,1 +1,4 @@ | ||
### [v1.2.11](https://github.com/adrai/sessionstore/compare/v1.2.9...v1.2.11) | ||
- some updates | ||
### [v1.2.9](https://github.com/adrai/sessionstore/compare/v1.2.8...v1.2.9) | ||
@@ -2,0 +5,0 @@ - redis: fix for new redis lib |
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
42188
1072