mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 15:12:54 +08:00
Fix stall when attempting to import replay after hitting nothing
This commit is contained in:
parent
7e53df5226
commit
4e9ad1388f
@ -274,6 +274,16 @@ namespace osu.Game.Screens.Play
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// if the user never hit anything, this score should not be counted in any way.
|
||||
if (!score.ScoreInfo.Statistics.Any(s => s.Key.IsHit() && s.Value > 0))
|
||||
{
|
||||
Logger.Log("No hits registered, skipping score submission");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
// mind the timing of this.
|
||||
// once `scoreSubmissionSource` is created, it is presumed that submission is taking place in the background,
|
||||
// so all exceptional circumstances that would disallow submission must be handled above.
|
||||
lock (scoreSubmissionLock)
|
||||
{
|
||||
if (scoreSubmissionSource != null)
|
||||
@ -282,10 +292,6 @@ namespace osu.Game.Screens.Play
|
||||
scoreSubmissionSource = new TaskCompletionSource<bool>();
|
||||
}
|
||||
|
||||
// if the user never hit anything, this score should not be counted in any way.
|
||||
if (!score.ScoreInfo.Statistics.Any(s => s.Key.IsHit() && s.Value > 0))
|
||||
return Task.CompletedTask;
|
||||
|
||||
Logger.Log($"Beginning score submission (token:{token.Value})...");
|
||||
var request = CreateSubmissionRequest(score, token.Value);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user