CORDA-1564 Remove old sessions on flow retry from multi-threaded SMM (#906)

This commit is contained in:
Rick Parker 2018-06-01 15:38:09 +01:00 committed by GitHub
parent 39548aefe2
commit 609c313496
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -356,6 +356,10 @@ class MultiThreadedStateMachineManager(
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>()