async void OnDestroy() { // Clean up Hub and channel shutdownCancellation.Cancel(); await streamingClient.DisposeAsync(); await channel.ShutdownAsync(); }
private async void _shutdown() { try { if (IsJoin) { await _chatHub.LeaveChat(); } } catch { // ignored } try { await _chatHub.DisposeAsync(); } catch (Exception e) { // ignored } }
public async Task DisposeAsync() => await chatHub.DisposeAsync();
async Task IHubClient.DisconnectHubAsync() { await _streamingHub.DisposeAsync(); }