mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 11:03:22 +08:00
Dispose token manually
Cover more branches with cancellation source disposal
This commit is contained in:
parent
96a447f68b
commit
d36944ac95
@ -342,6 +342,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
}
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
using (cancellationSource)
|
||||
{
|
||||
if (Room.Countdown != countdown)
|
||||
return;
|
||||
@ -349,13 +351,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
Room.Countdown = null;
|
||||
MatchEvent(new CountdownChangedEvent { Countdown = null });
|
||||
|
||||
using (cancellationSource)
|
||||
{
|
||||
if (stopSource.Token.IsCancellationRequested)
|
||||
return;
|
||||
}
|
||||
|
||||
StartMatch().WaitSafely();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user