mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 18:32:56 +08:00
Update all OnlineSpectatorCalls
to InvokeAsync
This commit is contained in:
parent
8e7e1e6b51
commit
0533249d11
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user