mirror of
https://github.com/corda/corda.git
synced 2025-01-29 15:43:55 +00:00
ENT-4955: Hide usage of FlowHospital inside StateMachineManager (#5997)
This commit is contained in:
parent
d2568b9077
commit
275e801094
@ -167,7 +167,7 @@ internal class CordaRPCOpsImpl(
|
||||
return snapshot
|
||||
}
|
||||
|
||||
override fun killFlow(id: StateMachineRunId): Boolean = if (smm.killFlow(id)) true else smm.flowHospital.dropSessionInit(id)
|
||||
override fun killFlow(id: StateMachineRunId): Boolean = smm.killFlow(id)
|
||||
|
||||
override fun stateMachinesFeed(): DataFeed<List<StateMachineInfo>, StateMachineUpdate> {
|
||||
|
||||
|
@ -229,7 +229,7 @@ class SingleThreadedStateMachineManager(
|
||||
}
|
||||
|
||||
override fun killFlow(id: StateMachineRunId): Boolean {
|
||||
return mutex.locked {
|
||||
val killFlowResult = mutex.locked {
|
||||
cancelTimeoutIfScheduled(id)
|
||||
val flow = flows.remove(id)
|
||||
if (flow != null) {
|
||||
@ -257,6 +257,11 @@ class SingleThreadedStateMachineManager(
|
||||
}
|
||||
}
|
||||
}
|
||||
return if(killFlowResult) {
|
||||
true
|
||||
} else {
|
||||
flowHospital.dropSessionInit(id)
|
||||
}
|
||||
}
|
||||
|
||||
override fun addSessionBinding(flowId: StateMachineRunId, sessionId: SessionId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user