mirror of
https://github.com/ppy/osu.git
synced 2026-05-28 21:21:08 +08:00
Fix thread safety
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user