mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
39dbe22c9d
Sessions are now terminated after performing the original `FlowIORequest` passed into `StartedFlowTransition`, instead of before. This is done by scheduling an `Event.TerminateSessions` if there are sessions to terminate when performing a suspending event. Originally this was done by hijacking a transition that is trying to perform a `StartedFlowTransition`, terminating the sessions and then scheduling another `Event.DoRemainingWork` to perform the original transition. This introduced a bug where, another event (from a external message) could be placed onto the queue before the `Event.DoRemainingWork` could be added. In most scenarios, that should be ok. But, if a flow is retrying (while in an uninitiated state) and this occurs the flow could fail due to being in an unexpected state. Terminating the sessions after performing the original transition removes this possibility. Meaning that a restarting flow will always perform the transition they supposed to do (based on the called suspending event). |
||
---|---|---|
.. | ||
capsule | ||
djvm | ||
src | ||
build.gradle |