Merge pull request #19187 from peppy/fix-reconnect-new-spectator-session

Fix spectator client not correctly reconnecting after shutdown
This commit is contained in:
Dean Herbert
2022-07-18 16:25:04 +09:00
committed by GitHub

View File

@ -56,7 +56,7 @@ namespace osu.Game.Online.Spectator
try try
{ {
await connection.SendAsync(nameof(ISpectatorServer.BeginPlaySession), state); await connection.InvokeAsync(nameof(ISpectatorServer.BeginPlaySession), state);
} }
catch (HubException exception) catch (HubException exception)
{ {
@ -73,7 +73,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null); Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.SendFrameData), bundle); return connection.InvokeAsync(nameof(ISpectatorServer.SendFrameData), bundle);
} }
protected override Task EndPlayingInternal(SpectatorState state) protected override Task EndPlayingInternal(SpectatorState state)
@ -83,7 +83,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null); Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.EndPlaySession), state); return connection.InvokeAsync(nameof(ISpectatorServer.EndPlaySession), state);
} }
protected override Task WatchUserInternal(int userId) protected override Task WatchUserInternal(int userId)
@ -93,7 +93,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null); Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.StartWatchingUser), userId); return connection.InvokeAsync(nameof(ISpectatorServer.StartWatchingUser), userId);
} }
protected override Task StopWatchingUserInternal(int userId) protected override Task StopWatchingUserInternal(int userId)
@ -103,7 +103,7 @@ namespace osu.Game.Online.Spectator
Debug.Assert(connection != null); Debug.Assert(connection != null);
return connection.SendAsync(nameof(ISpectatorServer.EndWatchingUser), userId); return connection.InvokeAsync(nameof(ISpectatorServer.EndWatchingUser), userId);
} }
} }
} }