mirror of
https://github.com/ppy/osu
synced 2024-12-25 16:22:23 +00:00
Fix thread safety
This commit is contained in:
parent
2a6faf6a8e
commit
d2155c3da3
@ -64,10 +64,12 @@ namespace osu.Game.Updater
|
||||
if (!CanCheckForUpdate)
|
||||
return;
|
||||
|
||||
lock (updateTaskLock)
|
||||
updateCheckTask ??= PerformUpdateCheck();
|
||||
Task waitTask;
|
||||
|
||||
await updateCheckTask;
|
||||
lock (updateTaskLock)
|
||||
waitTask = (updateCheckTask ??= PerformUpdateCheck());
|
||||
|
||||
await waitTask;
|
||||
|
||||
lock (updateTaskLock)
|
||||
updateCheckTask = null;
|
||||
|
Loading…
Reference in New Issue
Block a user