mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 05:23:05 +08:00
Exit match sub screen when a room goes away
Closes #13847. I think we can probably get some test coverage of this if required, but needs a bit of thought (basically an error needs to be thrown during the multiplayer client portion of the join procedure, after `CurrentRoom` is non-null but before the join completes). Manual testing on password branch (#13861) is possible since it currently errors due to missing method on the live/dev servers. - Create game, which will fail with `MethodNotExists`. - Note the fields on the settings screen are emptied. - Fill fields again and press create game (crash).
This commit is contained in:
parent
d85fc08d12
commit
c6bd58ea4b
@ -48,6 +48,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
private OngoingOperationTracker ongoingOperationTracker { get; set; }
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private Bindable<Room> currentRoom { get; set; }
|
||||||
|
|
||||||
private MultiplayerMatchSettingsOverlay settingsOverlay;
|
private MultiplayerMatchSettingsOverlay settingsOverlay;
|
||||||
|
|
||||||
private readonly IBindable<bool> isConnected = new Bindable<bool>();
|
private readonly IBindable<bool> isConnected = new Bindable<bool>();
|
||||||
@ -273,6 +276,16 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
if (!connected.NewValue)
|
if (!connected.NewValue)
|
||||||
Schedule(this.Exit);
|
Schedule(this.Exit);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
currentRoom.BindValueChanged(room =>
|
||||||
|
{
|
||||||
|
if (room.NewValue == null)
|
||||||
|
{
|
||||||
|
// the room has gone away.
|
||||||
|
// this could mean something happened during the join process, or an external connection issue occurred.
|
||||||
|
Schedule(this.Exit);
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateMods()
|
protected override void UpdateMods()
|
||||||
|
Loading…
Reference in New Issue
Block a user