mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 02:22:56 +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:
commit
198567aa95
@ -13,6 +13,7 @@ using osu.Framework.Screens;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Online.Spectator;
|
using osu.Game.Online.Spectator;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
@ -158,8 +159,11 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
if (LoadedBeatmapSuccessfully)
|
if (LoadedBeatmapSuccessfully)
|
||||||
{
|
{
|
||||||
submitScore(Score.DeepClone());
|
Task.Run(async () =>
|
||||||
spectatorClient.EndPlaying(GameplayState);
|
{
|
||||||
|
await submitScore(Score.DeepClone()).ConfigureAwait(false);
|
||||||
|
spectatorClient.EndPlaying(GameplayState);
|
||||||
|
}).FireAndForget();
|
||||||
}
|
}
|
||||||
|
|
||||||
return exiting;
|
return exiting;
|
||||||
|
Loading…
Reference in New Issue
Block a user