Skip to content

Commit

Permalink
remove extra closure
Browse files Browse the repository at this point in the history
This commit removes an extra closure which captures circular
memory references.
  • Loading branch information
cjihrig committed Feb 28, 2017
1 parent 713ec75 commit cebbec6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/protect.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ exports = module.exports = internals.Protect = function (request) {
Domain = Domain || require('domain');

this.domain = Domain.create();
this.domain.on('error', (err) => {

return this._onError(err);
});
this.domain.on('error', this._onError.bind(this));
};


Expand Down

0 comments on commit cebbec6

Please sign in to comment.