Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed session reaper

  • Loading branch information...
commit febf44396097b9fd0a26ba844f268b7dc59992a1 1 parent f5da81e
@tj tj authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/express/plugins/session.js
2  lib/express/plugins/session.js
@@ -190,7 +190,7 @@ exports.Session = Plugin.extend({
startReaper: function() {
- setTimeout(function(self) {
+ setInterval(function(self) { || (1).day)
}, this.reapInterval || this.reapEvery || (1).hour, this)

6 comments on commit febf443


Hmm, this means that reap's can now theoretically overlap, are you happy with that ? .. IF so then we should remove the callback argument from the reap method as it will be misleading ?


just a quick temp file so its at least "working" for now. I dont think
this would cause much trouble but it is a flaw, I just did not catch
that intention since I have been designing async apis with sync implementations (memory store)
haha so its a bit stupid, we can re-implement your solution for both cache / session


ideally when we kinda merge the two efforts


;) I don't think I need to make any more modifications to the core stuff now, I'll hopefully have the mongodb session provider done and dusted later this weekend, but we need to decide how to distribute/provide express plugins that introduce non-core dependencies (much as I'm not a big fan of having express depend on a non-node shipped PM, having kiwi there did let me pull down the dependencies neatly )


yeah that is an issue, I want to make sure everyone can cleanly test their own
plugins without having an express submodule just for express/spec


honestly i dont think this will be much an issue though,
if the reaper fires and has a low interval like (2).minutes your
store still has 2 minutes to do whatever, so if that overlaps then
... lame lol I think we can revisit this issue

Please sign in to comment.
Something went wrong with that request. Please try again.