Skip to content

Instantly share code, notes, and snippets.

@ThisIsMissEm
Created November 25, 2010 10:56
Show Gist options
  • Save ThisIsMissEm/715209 to your computer and use it in GitHub Desktop.
Save ThisIsMissEm/715209 to your computer and use it in GitHub Desktop.
*** nws-memstore.js 2010-11-25 19:41:25.000000000 +0900
--- nws-memstore.js.new 2010-11-25 19:43:50.000000000 +0900
***************
*** 4,14 ****
-----------------------------------------------*/
exports.attachTo = function(server){
! server.manager.on("connection", function(c){
c.memstore = new memStore();
});
! server.manager.on("close", function(c){
if(c.memstore){
c.memstore._destroy();
}
--- 4,17 ----
-----------------------------------------------*/
exports.attachTo = function(server){
! //updated by Kensaku KOMATSU(2011-11-25)
! server.on("connection", function(c){
! console.log("memstore: connection");
c.memstore = new memStore();
});
! //updated by Kensaku KOMATSU(2011-11-25)
! server.on("close", function(c){
if(c.memstore){
c.memstore._destroy();
}
***************
*** 81,84 ****
data = {};
}
};
! };
\ No newline at end of file
--- 84,87 ----
data = {};
}
};
! };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment