requarks / connect-loki

A Loki.js session store for Connect/Express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to destroy session

rohithramachandran opened this issue · comments

when i am trying to destroy a session (store.destroy ) with following code
route.js

30   var store=req.sessionStore;
31   store.destroy(sessionID, function(error){
32      logger.info("Session destroyed");
33      res.end();
30  });

i am getting this error

Error: Object is not a document stored in the collection
   at LokiEventEmitter.Collection.remove (/home/rohith/workspace/express/SelfcareServer/node_modules/lokijs/src/lokijs.js:4112:15)
   at LokiStore.client.loadDatabase.LokiStore.destroy (/home/rohith/workspace/express/SelfcareServer/node_modules/connect-loki/lib/connect-loki.js:151:19)
   at /home/rohith/workspace/express/SelfcareServer/modules/routes.js:31:13

Can somebody help me out this problem ?