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;
        }