Fix stall when attempting to import replay after hitting nothing #29715
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #29065.
#29065 (comment) describes what's happened here already, but just to recap using perhaps more clear wording:
submitFromFailOrQuit()
fires, callssubmitScore()
, which createsscoreSubmissionSource
and then bails because nothing was hitprepareAndImportScoreAsync()
goes into the same submission flow andsubmitScore()
, which notices thatscoreSubmissionSource
already exists, thus presuming that submission is actively taking place and waiting for that to complete, while in fact submission is not happening and the wait will last forever.I previously stated pretty categorically that score import going into the submission flow looked pretty flagrantly wrong, but I'll eat crow now and double back on that - there are valid reasons to wait for submission on import, first and foremost being correct population of the online score ID. The fact that the submission logic is spread out between
Player
andSubmittingPlayer
via abstract overrides and local function calls doesn't help in attempting to refactor this further anyway.