mirror of https://github.com/ppy/osu
Lock one more case of usage
This commit is contained in:
parent
060bb1afbd
commit
8a4c0c0ac8
|
@ -189,11 +189,14 @@ public void BeginAsyncLoad()
|
|||
/// </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)
|
||||
|
|
Loading…
Reference in New Issue