Skip to content

Conversation

@smoogipoo
Copy link
Contributor

Fixes https://osu.ppy.sh/community/forums/topics/2160029?n=1

RFC. I'm not sure of a better way to handle this...

Normally, the server knows score submission completed by way of users getting into the FinishedPlay state, but this is not the case in the failing scenario.

The failing scenario is, that when a user quits gameplay score submission runs asynchronously in the background while the server thinks that it's complete by way of the user no longer being in the Gameplay state.

This diff accurately reproduces the fixed issue:

diff --git a/osu.Game/Screens/Play/SubmittingPlayer.cs b/osu.Game/Screens/Play/SubmittingPlayer.cs
index 06f1a9c530..9b611bc29e 100644
--- a/osu.Game/Screens/Play/SubmittingPlayer.cs
+++ b/osu.Game/Screens/Play/SubmittingPlayer.cs
@@ -269,6 +269,7 @@ private void submitFromFailOrQuit(Score score)
 
                 Task.Run(async () =>
                 {
+                    await Task.Delay(3000);
                     await submitScore(scoreCopy).ConfigureAwait(false);
                     spectatorClient.EndPlaying(GameplayState);
                 }).FireAndForget();

Which now behaves like this:

2025-12-08.19-51-29.mp4

@smoogipoo smoogipoo requested a review from peppy December 8, 2025 10:58
@smoogipoo smoogipoo self-assigned this Dec 8, 2025
@github-project-automation github-project-automation bot moved this to Ready for work in osu! untitled project Dec 8, 2025
@smoogipoo smoogipoo moved this from Ready for work to Pending Review in osu! untitled project Dec 8, 2025
@peppy
Copy link
Member

peppy commented Dec 8, 2025

What's the case here where it takes over 10 seconds? It's just going to fail as previously? Is there any better direction we can drive things in such a case?

@smoogipoo
Copy link
Contributor Author

smoogipoo commented Dec 8, 2025

Is there any better direction we can drive things in such a case?

Yeah that's kind of what I want comments on. I'm out of ideas of how to handle this case :(

My idea with 10 seconds is that it's the default o!f web request timeout, though I see now that SubmitScoreRequest is actually 30 seconds...

@smoogipoo
Copy link
Contributor Author

Don't merge this yet, just realised I forgot a sleep delay.

@smoogipoo smoogipoo marked this pull request as draft December 8, 2025 14:40
@smoogipoo smoogipoo moved this from Pending Review to In Progress in osu! untitled project Dec 11, 2025
@peppy peppy moved this from In Progress to Backburner in osu! untitled project Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backburner

Development

Successfully merging this pull request may close these issues.

2 participants