File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/Backdash/Session/Backends Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,9 @@ SessionServices<TInput> services
5555 this . options = options ;
5656 }
5757
58- public void Dispose ( ) => tsc . SetResult ( ) ;
58+ public void Dispose ( ) => tsc . SetCanceled ( ) ;
5959
60- public async ValueTask DisposeAsync ( )
61- {
62- Dispose ( ) ;
63- await WaitUntilFinish ( ) ;
64- }
60+ public async ValueTask DisposeAsync ( ) => await WaitUntilFinish ( ) ;
6561
6662 public int NumberOfPlayers => Math . Max ( addedPlayers . Count , 1 ) ;
6763 public int NumberOfSpectators => 0 ;
@@ -97,7 +93,7 @@ public void Start(CancellationToken stoppingToken = default)
9793 public async Task WaitUntilFinish ( CancellationToken stoppingToken = default )
9894 {
9995 // ReSharper disable once MethodSupportsCancellation
100- tsc . SetCanceled ( stoppingToken ) ;
96+ tsc . TrySetCanceled ( stoppingToken ) ;
10197 await backGroundJobTask . WaitAsync ( stoppingToken ) . ConfigureAwait ( false ) ;
10298 }
10399
You can’t perform that action at this time.
0 commit comments