1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00

Lock one more case of usage

This commit is contained in:
Dean Herbert 2021-10-14 16:22:43 +09:00
parent 060bb1afbd
commit 8a4c0c0ac8

View File

@ -189,11 +189,14 @@ namespace osu.Game.Beatmaps
/// </summary>
public void CancelAsyncLoad()
{
loadCancellation?.Cancel();
loadCancellation = new CancellationTokenSource();
lock (beatmapFetchLock)
{
loadCancellation?.Cancel();
loadCancellation = new CancellationTokenSource();
if (beatmapLoadTask?.IsCompleted != true)
beatmapLoadTask = null;
if (beatmapLoadTask?.IsCompleted != true)
beatmapLoadTask = null;
}
}
private CancellationTokenSource createCancellationTokenSource(TimeSpan? timeout)