public void Dispose()
        {
            if (isDispose)
            {
                return;
            }

            isDispose = true;
            _receiver.CloseAsync().GetAwaiter().GetResult();
            _receiver = null;
        }
Пример #2
0
        public async ValueTask DisposeAsync()
        {
            if (isDispose)
            {
                return;
            }

            isDispose = true;
            await _receiver.CloseAsync();

            _receiver = null;
        }