diff --git a/lib/sessionmanager.js b/lib/sessionmanager.js index 81b59b1d..344a5700 100644 --- a/lib/sessionmanager.js +++ b/lib/sessionmanager.js @@ -86,8 +86,15 @@ SessionManager.prototype.logOut = function(req, options, cb) { } if (options.keepSessionInfo) { merge(req.session, prevSession); + req.session.save(function(err) { + if (err) { + return cb(err); + } + cb(); + }); + } else { + cb(); } - cb(); }); }); }