public async Task CloseAsync(int timeout) { if (Interlocked.Decrement(ref _referenceCount) <= 0) { if (timeout == 0) { await _client.CloseAsync(); } else { await _client.CloseAsync(timeout); } _client = ReplaceWithLazyClient(); } }
public Task CloseAsync() { return(_client?.CloseAsync()); }