From 8e111bbbaa2300b5b9f52a96f51495cf08772bac Mon Sep 17 00:00:00 2001 From: skoranga Date: Mon, 18 Aug 2014 16:01:12 -0700 Subject: [PATCH 1/2] removing async res.end locally --- index.js | 14 ++++++++------ package.json | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index a84f60d5..2bdad4d0 100644 --- a/index.js +++ b/index.js @@ -244,10 +244,10 @@ function session(options){ } debug('destroyed'); - writeend(); + return _end.call(res, chunk, encoding); }); - return writetop(); + //return writetop(); } // no session to save @@ -266,13 +266,15 @@ function session(options){ } debug('saved'); - writeend(); + return _end.call(res, chunk, encoding); }); - return writetop(); + //return writetop(); + } else { + return _end.call(res, chunk, encoding); } - return _end.call(res, chunk, encoding); + //return _end.call(res, chunk, encoding); }; // generate the session @@ -489,4 +491,4 @@ function setcookie(res, name, val, secret, options) { : [prev, data]; res.setHeader('set-cookie', header) -} +} \ No newline at end of file diff --git a/package.json b/package.json index 7494c9f6..a4e05c50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-session", - "version": "1.7.6", + "version": "1.7.6-beta", "description": "Simple session middleware for Express", "author": "TJ Holowaychuk (http://tjholowaychuk.com)", "contributors": [ From 0bbc2ad843c9889ca2670c1d74bd04682db2df37 Mon Sep 17 00:00:00 2001 From: Venkatesan Mahendran Date: Thu, 18 Sep 2014 12:55:19 +0530 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4e05c50..1f4c2502 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-session", - "version": "1.7.6-beta", + "version": "1.8.2", "description": "Simple session middleware for Express", "author": "TJ Holowaychuk (http://tjholowaychuk.com)", "contributors": [