예제 #1
0
        async void OnDestroy()
        {
            // Clean up Hub and channel
            shutdownCancellation.Cancel();

            await streamingClient.DisposeAsync();

            await channel.ShutdownAsync();
        }
예제 #2
0
        private async void _shutdown()
        {
            try
            {
                if (IsJoin)
                {
                    await _chatHub.LeaveChat();
                }
            }
            catch
            {
                // ignored
            }

            try
            {
                await _chatHub.DisposeAsync();
            }
            catch (Exception e)
            {
                // ignored
            }
        }
예제 #3
0
 public async Task DisposeAsync() => await chatHub.DisposeAsync();
 async Task IHubClient.DisconnectHubAsync()
 {
     await _streamingHub.DisposeAsync();
 }