1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-01 07:39:54 +08:00

Merge pull request #21753 from bdach/submission-early-exit-ordering-guarantees

Ensure score submission completion before notifying spectator server when exiting play early
This commit is contained in:
Dan Balasescu
2022-12-22 14:48:43 +09:00
committed by GitHub
Unverified
+6 -2
View File
@@ -13,6 +13,7 @@ using osu.Framework.Screens;
using osu.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Online.API;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Online.Spectator;
using osu.Game.Rulesets.Scoring;
@@ -158,8 +159,11 @@ namespace osu.Game.Screens.Play
if (LoadedBeatmapSuccessfully)
{
submitScore(Score.DeepClone());
spectatorClient.EndPlaying(GameplayState);
Task.Run(async () =>
{
await submitScore(Score.DeepClone()).ConfigureAwait(false);
spectatorClient.EndPlaying(GameplayState);
}).FireAndForget();
}
return exiting;