mirror of
https://github.com/ppy/osu
synced 2025-02-16 01:56:58 +00:00
Show an error when forcefully exiting online play due to API failure
This commit is contained in:
parent
4d04e0dee7
commit
906a9b79b5
@ -8,6 +8,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps.Drawables;
|
using osu.Game.Beatmaps.Drawables;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
@ -165,7 +166,10 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule(() =>
|
private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (state.NewValue != APIState.Online)
|
if (state.NewValue != APIState.Online)
|
||||||
|
{
|
||||||
|
Logger.Log("API connection was lost, can't continue with online play", LoggingTarget.Network, LogLevel.Important);
|
||||||
Schedule(forcefullyExit);
|
Schedule(forcefullyExit);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
Loading…
Reference in New Issue
Block a user