1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:07:26 +08:00

Fix onSuccess callback potentially being called on failure

This commit is contained in:
smoogipoo 2020-12-20 18:03:30 +09:00
parent 9b08f573ba
commit 812a1d2b4f

View File

@ -62,7 +62,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
Debug.Assert(room.RoomID.Value != null); Debug.Assert(room.RoomID.Value != null);
var joinTask = multiplayerClient.JoinRoom(room); var joinTask = multiplayerClient.JoinRoom(room);
joinTask.ContinueWith(_ => onSuccess?.Invoke(room)); joinTask.ContinueWith(_ => onSuccess?.Invoke(room), TaskContinuationOptions.OnlyOnRanToCompletion);
joinTask.ContinueWith(t => joinTask.ContinueWith(t =>
{ {
PartRoom(); PartRoom();