mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 16:32:54 +08:00
Fix JoinRoom failing to return canceled token
As it turns out, `Task.FromCanceled` expects to receive an already cancelled `CancellationToken`, which `CancellationToken.None` is not.
This commit is contained in:
parent
74f0c50d82
commit
3b0bf11366
@ -122,7 +122,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
|
||||
protected override Task<MultiplayerRoom> JoinRoom(long roomId)
|
||||
{
|
||||
if (!isConnected.Value)
|
||||
return Task.FromCanceled<MultiplayerRoom>(CancellationToken.None);
|
||||
return Task.FromCanceled<MultiplayerRoom>(new CancellationToken(true));
|
||||
|
||||
return connection.InvokeAsync<MultiplayerRoom>(nameof(IMultiplayerServer.JoinRoom), roomId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user