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();
     }
 }
예제 #2
0
 public Task CloseAsync()
 {
     return(_client?.CloseAsync());
 }