Update BehaviourContextWithFSM.kt

This commit is contained in:
InsanusMokrassar authored and GitHub committed 2022-12-28 22:59:10 +06:00
1 parent ee055873e6
commit c193b512d9
1 file changed
+1 -1
@@ -197,7 +197,7 @@ class DefaultBehaviourContextWithFSM<T : State>(
statesJobsMutex.withLock {
runCatchingSafely { statesJobs.remove(old) ?.cancel() }
runCatchingSafely { statesJobs.remove(new) ?.cancel() }
statesJobs[new] = launch { statePerformer(new) }.apply { enableRemoveOnCompletion(it) }
statesJobs[new] = launch { statePerformer(new) }.apply { enableRemoveOnCompletion(new) }
}
if (old.context != new.context) {
updatesFlows.remove(old.context)