Skip to content

Commit

Permalink
[Event Hubs Client] Removed exception rethrown (Azure#8592) (Azure#9431)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodenatale committed Mar 8, 2020
1 parent a1dda66 commit 56f9279
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,12 @@ public virtual PooledProducer GetPooledProducer(string partitionId,
///
public virtual async Task CloseAsync(CancellationToken cancellationToken = default)
{
var expirationTimerException = default(Exception);

try
{
ExpirationTimer.Dispose();
}
catch (Exception e)
catch (Exception)
{
expirationTimerException = e;
}

var pendingCloses = new List<Task>();
Expand All @@ -190,14 +187,6 @@ public virtual async Task CloseAsync(CancellationToken cancellationToken = defau
Pool.Clear();

await Task.WhenAll(pendingCloses).ConfigureAwait(false);

// If there was an active exception pending from closing the
// expiration timer, surface it now.

if (expirationTimerException != default)
{
throw expirationTimerException;
}
}

/// <summary>
Expand Down

0 comments on commit 56f9279

Please sign in to comment.