Skip to content

Commit

Permalink
Dispose domain on response finish event
Browse files Browse the repository at this point in the history
  • Loading branch information
baryshev committed Mar 13, 2013
1 parent 9066460 commit 1c2b75f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/connect-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ module.exports = function () {
reqDomain.dispose();
});

res.on('finish', function () {

This comment has been minimized.

Copy link
@fengmk2

fengmk2 Mar 14, 2013

Contributor

This will let connect.static middleware broken.

reqDomain.dispose();
});

reqDomain.on('error', function (err) {
// Once a domain is disposed, further errors from the emitters in that set will be ignored.
reqDomain.dispose();
Expand Down

0 comments on commit 1c2b75f

Please sign in to comment.