mirror of
https://github.com/osukey/osukey.git
synced 2025-05-21 13:37:20 +09:00
Fix thread safety
This commit is contained in:
parent
2a6faf6a8e
commit
d2155c3da3
@ -64,10 +64,12 @@ namespace osu.Game.Updater
|
|||||||
if (!CanCheckForUpdate)
|
if (!CanCheckForUpdate)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lock (updateTaskLock)
|
Task waitTask;
|
||||||
updateCheckTask ??= PerformUpdateCheck();
|
|
||||||
|
|
||||||
await updateCheckTask;
|
lock (updateTaskLock)
|
||||||
|
waitTask = (updateCheckTask ??= PerformUpdateCheck());
|
||||||
|
|
||||||
|
await waitTask;
|
||||||
|
|
||||||
lock (updateTaskLock)
|
lock (updateTaskLock)
|
||||||
updateCheckTask = null;
|
updateCheckTask = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user