mirror of
https://github.com/ppy/osu
synced 2024-12-19 05:15:30 +00: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.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;
|
||||
|
Loading…
Reference in New Issue
Block a user