1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Update all OnlineSpectatorCalls to InvokeAsync

This commit is contained in:
Dean Herbert 2022-07-18 14:34:02 +09:00
parent 8e7e1e6b51
commit 0533249d11
2 changed files with 4 additions and 6 deletions

View File

@ -80,7 +80,6 @@ namespace osu.Game.Online.Multiplayer
try
{
// Importantly, use Invoke rather than Send to capture exceptions.
return await connection.InvokeAsync<MultiplayerRoom>(nameof(IMultiplayerServer.JoinRoomWithPassword), roomId, password ?? string.Empty);
}
catch (HubException exception)

View File

@ -56,7 +56,6 @@ namespace osu.Game.Online.Spectator
try
{
// Importantly, use Invoke rather than Send to capture exceptions.
await connection.InvokeAsync(nameof(ISpectatorServer.BeginPlaySession), state);
}
catch (HubException exception)
@ -74,7 +73,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.SendFrameData), bundle);
return connection.InvokeAsync(nameof(ISpectatorServer.SendFrameData), bundle);
}
protected override Task EndPlayingInternal(SpectatorState state)
@ -84,7 +83,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.EndPlaySession), state);
return connection.InvokeAsync(nameof(ISpectatorServer.EndPlaySession), state);
}
protected override Task WatchUserInternal(int userId)
@ -94,7 +93,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.StartWatchingUser), userId);
return connection.InvokeAsync(nameof(ISpectatorServer.StartWatchingUser), userId);
}
protected override Task StopWatchingUserInternal(int userId)
@ -104,7 +103,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.EndWatchingUser), userId);
return connection.InvokeAsync(nameof(ISpectatorServer.EndWatchingUser), userId);
}
}
}