-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix finalization after failure (#161)
* Fix finalization after failure It appears to have only worked coincidentally before. When the interpreter enters into a finalization block, it puts a `Finalized` node onto the attempt stack with the current `step`. However if there was a failure, then step would be null. It "worked" before because there was stale state, and `fail` could be preserved through finalization. This bug was exposed by using `catchError` within the finalization block, which resets the failure state to null. Thus when it resumes after finalization, both `step` and `fail` are null, which is an invalid state. The solution is to preserve `fail` in addition to `step` in a `Finalized` node. * Cleanup potentially stale state
- Loading branch information
1 parent
c02ae17
commit 5450756
Showing
2 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters