Merge pull request #4809 from peppy/fix-restart-race-condition

Fix race condition causing player to never restart
This commit is contained in:
Dan Balasescu 2019-05-17 19:21:55 +09:00 committed by GitHub
commit c7d4b2d138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,6 +249,10 @@ namespace osu.Game.Screens.Play
if (!this.IsCurrentScreen()) return;
sampleRestart?.Play();
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
onCompletionEvent = null;
ValidForResume = false;
RestartRequested?.Invoke();
this.Exit();