protected override Task DisconnectAsync()
        {
            if (_subscription == null && _allSubscription == null)
            {
                return(Task.CompletedTask);
            }

            _cancellationRequestedByUser = true;

            if (_subscription != null)
            {
                _subscription.Dispose();
            }

            if (_allSubscription != null)
            {
                _allSubscription.Dispose();
            }

            if (_store != null)
            {
                _store.Dispose();
            }

            _status = SubscriptionConnectionStatus.Disconnected;
            return(Task.CompletedTask);
        }
        protected override Task DisconnectAsync()
        {
            if (_allSubscription != null)
            {
                _cancellationRequestedByUser = true;
                _allSubscription.Dispose();
            }
            else if (_streamSubscription != null)
            {
                _cancellationRequestedByUser = true;
                _streamSubscription.Dispose();
            }

            return(Task.CompletedTask);
        }