mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
SessionStore: Don't call callback until cached in DB layer
This commit is contained in:
parent
436cbb031d
commit
a4be577ed1
1 changed files with 2 additions and 4 deletions
|
@ -33,13 +33,11 @@ module.exports = class SessionStore extends Store {
|
|||
|
||||
set(sid, sess, fn) {
|
||||
logger.debug('SET ' + sid);
|
||||
DB.db.set('sessionstorage:' + sid, sess);
|
||||
if (fn) process.nextTick(fn);
|
||||
DB.db.set('sessionstorage:' + sid, sess, fn);
|
||||
}
|
||||
|
||||
destroy(sid, fn) {
|
||||
logger.debug('DESTROY ' + sid);
|
||||
DB.db.remove('sessionstorage:' + sid);
|
||||
if (fn) process.nextTick(fn);
|
||||
DB.db.remove('sessionstorage:' + sid, fn);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue