redis-sessions
Advanced tools
Comparing version 1.0.1 to 1.0.2
# CHANGELOG | ||
## 1.0.2 | ||
* Fixed possible memory leak in wipe functions | ||
## 1.0.1 | ||
@@ -4,0 +8,0 @@ |
37
index.js
@@ -37,3 +37,2 @@ // Generated by CoffeeScript 1.9.3 | ||
} | ||
this._wipe = bind(this._wipe, this); | ||
this._returnSessions = bind(this._returnSessions, this); | ||
@@ -627,21 +626,19 @@ this._initErrors = bind(this._initErrors, this); | ||
RedisSessions.prototype._wipe = function() { | ||
this.redis.zrangebyscore(this.redisns + "SESSIONS", "-inf", this._now(), (function(_this) { | ||
return function(err, resp) { | ||
if (err) { | ||
return; | ||
} | ||
if (resp.length) { | ||
_.each(resp, function(e) { | ||
var options; | ||
e = e.split(':'); | ||
options = { | ||
app: e[0], | ||
token: e[1], | ||
id: e[2] | ||
}; | ||
_this._kill(options, function() {}); | ||
}); | ||
} | ||
}; | ||
})(this)); | ||
var that; | ||
that = this; | ||
this.redis.zrangebyscore(this.redisns + "SESSIONS", "-inf", this._now(), function(err, resp) { | ||
if (!err && resp.length) { | ||
_.each(resp, function(e) { | ||
var options; | ||
e = e.split(':'); | ||
options = { | ||
app: e[0], | ||
token: e[1], | ||
id: e[2] | ||
}; | ||
that._kill(options, function() {}); | ||
}); | ||
return; | ||
} | ||
}); | ||
}; | ||
@@ -648,0 +645,0 @@ |
{ | ||
"name": "redis-sessions", | ||
"description": "An advanced session store for Redis", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"author": "P. Liess <smrchy+npm@gmail.com>", | ||
@@ -13,7 +13,7 @@ "engines": { | ||
"dependencies": { | ||
"redis": "2.4.2", | ||
"lodash": "4.x" | ||
"redis": "^2.4.2", | ||
"lodash": "^4.x" | ||
}, | ||
"optionalDependencies": { | ||
"hiredis": "0.4.1" | ||
"hiredis": "^0.4.1" | ||
}, | ||
@@ -20,0 +20,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
95028
1404
+ Addedredis@2.8.0(transitive)
+ Addedredis-parser@2.6.0(transitive)
- Removedredis@2.4.2(transitive)
Updatedlodash@^4.x
Updatedredis@^2.4.2