Permalink
Browse files

[minor] Remove no longer needed workaround for issue #196

  • Loading branch information...
lpinca committed Nov 29, 2015
1 parent 8dc6e0d commit 62c02cd6236ebdd88568ef2daa88da33a263f5a8
Showing with 0 additions and 15 deletions.
  1. +0 −11 examples/middleware/session.js
  2. +0 −4 middleware/authorization.js
@@ -40,21 +40,10 @@ module.exports = function configure(options) {
//
if (!sid) return next();
- //
- // Pause the request before retrieving the session. This ensures that no
- // `data` event is lost while we perform our async call.
- //
- req.pause();
-
//
// Grab the session from the store.
//
store.get(sid, function (err, session) {
- //
- // At this point the request stream can resume emitting `data` events.
- //
- req.resume();
-
//
// We don't want to kill the connection when we get an error from the
// session store so we just log the error.
@@ -18,11 +18,7 @@ module.exports = function configuration() {
return function client(req, res, next) {
if ('function' !== typeof this.auth) return next();
- req.pause();
-
this.auth(req, function authorized(err) {
- req.resume();
-
if (!err) return next();
var message = JSON.stringify({ error: err.message || err })

0 comments on commit 62c02cd

Please sign in to comment.