public async ValueTask DisposeAsync() { await _lock.DisposeAsync(); _requestResponseHandler.Dispose(); _channelManager.Dispose(); await _stream.DisposeAsync(); }
public async ValueTask DisposeAsync() { if (Interlocked.Exchange(ref _isDisposed, 1) != 0) { return; } await _lock.DisposeAsync().ConfigureAwait(false); _channelManager.Dispose(); await _stream.DisposeAsync().ConfigureAwait(false); }