Skip to content

Commit

Permalink
avoid recursing error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo committed Oct 30, 2015
1 parent 1c7c51e commit 3f0eae5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bagpipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ Bagpipes.prototype.handleError = function handleError(context, err) {

context.error = err;
debug('starting onError pipe');
this.play(context._errorHandler, context);
var errorHandler = context._errorHandler;
delete(context._errorHandler);
this.play(errorHandler, context);
};

function preflight(context, fittingDef) {
Expand Down

0 comments on commit 3f0eae5

Please sign in to comment.