private async void OnDestroy() { BlockRenderHandler.Instance.Stop(); ActionRenderHandler.Instance.Stop(); ActionUnrenderHandler.Instance.Stop(); StopAllCoroutines(); if (!(_hub is null)) { await _hub.DisposeAsync(); } if (!(_channel is null)) { await _channel?.ShutdownAsync(); } }
public override async Task StopAsync(CancellationToken cancellationToken) { await _client?.DisposeAsync(); await base.StopAsync(cancellationToken); }