Пример #1
0
        public async ValueTask DisposeAsync()
        {
            await _underlying.DisposeAsync();

            if (SslStream != null)
            {
                await SslStream.DisposeAsync();

                try
                {
                    await _writeStream !.DisposeAsync();
                }
                catch (Exception)
                {
                    // Ignore: the buffer flush which will fail since the underlying transport is closed.
                }
            }
        }
Пример #2
0
 public override ValueTask DisposeAsync()
 {
     Closed();
     return(_transceiver.DisposeAsync());
 }