1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Handle unobserved exceptions from ready button properly

This commit is contained in:
Bartłomiej Dach 2020-12-31 11:50:59 +01:00
parent f800448c87
commit 7d9a61fbc1

View File

@ -222,6 +222,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
// accessing Exception here silences any potential errors from the antecedent task
if (t.Exception != null)
{
t.CatchUnobservedExceptions(true); // will run immediately.
// gameplay was not started due to an exception; unblock button.
endOperation();
}
@ -232,8 +233,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
}
client.ToggleReady()
.ContinueWith(_ => endOperation())
.CatchUnobservedExceptions();
.ContinueWith(t =>
{
t.CatchUnobservedExceptions(true); // will run immediately.
endOperation();
});
void endOperation()
{