CORDA-1564 Clean up old sessions when retrying flows. (#3278)

This commit is contained in:
Rick Parker
2018-05-31 18:43:50 +01:00
committed by GitHub
parent 74fd5b9e9d
commit 51c359c48d

View File

@ -354,6 +354,10 @@ class SingleThreadedStateMachineManager(
null
}
externalEventMutex.withLock {
// Remove any sessions the old flow has.
for (sessionId in getFlowSessionIds(currentState.checkpoint)) {
sessionToFlow.remove(sessionId)
}
if (flow != null) addAndStartFlow(flowId, flow)
// Deliver all the external events from the old flow instance.
val unprocessedExternalEvents = mutableListOf<ExternalEvent>()