Skip to content

Commit ee21d8e

Browse files
committedAug 18, 2015
fix: an error thrown in a wf completion cb caused multiple reexecutions of cb
1 parent 70d6c35 commit ee21d8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ var workflow = {
269269
var originalDone = context.originalTerminate || done;
270270
var donePosition = context.completionStack.indexOf(originalDone);
271271
context.completionStack.splice(donePosition, 1)
272-
done(err, res, context)
272+
setImmediate(function() {
273+
done(err, res, context)
274+
})
273275
}
274276

275277
debug("Executing WF %s", getStepName(workflowDefinition))

0 commit comments

Comments
 (0)
Please sign in to comment.