1
This commit is contained in:
@@ -64,8 +64,11 @@ namespace BITKit.StateMachine
|
||||
if(_cancellationTokenSource.IsCancellationRequested)return;
|
||||
if (CurrentState is null) return;
|
||||
using var _ = IsBusy.GetHandle();
|
||||
if (CurrentState is not null)
|
||||
{
|
||||
CurrentState.Enabled = false;
|
||||
}
|
||||
await CurrentState.OnStateExitAsync(CurrentState, null);
|
||||
if(_cancellationTokenSource.IsCancellationRequested)return;
|
||||
CurrentState.OnStateExit(CurrentState, null);
|
||||
CurrentState = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user