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

Cancel room joins on part

This commit is contained in:
smoogipoo 2019-10-30 14:41:54 +09:00
parent 95ff48c123
commit b6457f0ce9

View File

@ -87,9 +87,8 @@ namespace osu.Game.Screens.Multi
public void JoinRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null)
{
currentJoinRoomRequest?.Cancel();
currentJoinRoomRequest = null;
currentJoinRoomRequest = new JoinRoomRequest(room, api.LocalUser.Value);
currentJoinRoomRequest.Success += () =>
{
joinedRoom = room;
@ -108,6 +107,8 @@ namespace osu.Game.Screens.Multi
public void PartRoom()
{
currentJoinRoomRequest?.Cancel();
if (joinedRoom == null)
return;