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:
parent
9b08f573ba
commit
812a1d2b4f
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user