1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-07 07:57:20 +08:00
Bartłomiej Dach 7fbd47e9ee
Fix MultiplayerMatchSubScreen erroneously pushing exit dialog on API failure
If `IAPIProvider.State` changes from `Online` at any point when being on
an `OnlinePlayScreen`, it will be forcefully exited from. However,
`MultiplayerMatchSubScreen` had local logic that suppressed the exit in
order to show a confirmation dialog.

The problem is, that in the suppression logic,
`MultiplayerMatchSubScreen` was checking
`MultiplayerClient.IsConnected`, which is a SignalR flag, and was not
checking `IAPIAccess.State`, which is maintained separately. Due to
differing timeouts and failure thresholds, it is not impossible to have
`MultiplayerClient.IsConnected == true` but `IAPIAccess.State !=
APIState.Online`.

In such a case, the match subscreen would wrongly consider itself to be
still online and due to that, push useless confirmation dialogs, while
being in the process of being forcefully exited. This then caused the
dialog to cause a crash, as it was calling `.Exit()` on the screen which
would already have been exited by that point, by the force-exit flow.
2023-07-16 19:56:22 +02:00
..
2023-07-06 13:37:43 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2022-09-18 17:55:06 -07:00
2023-07-16 10:21:32 +08:00
2023-07-08 15:03:33 +02:00
2022-11-27 00:00:27 +09:00
2023-07-04 14:50:34 +09:00
2023-06-24 01:00:03 +09:00
2023-07-17 00:55:25 +09:00
2023-06-24 01:00:03 +09:00
2023-06-29 17:15:48 +09:00
2022-11-27 00:00:27 +09:00