async Task Poll(CancellationToken cancellationToken)
{
while (!cancellationToken.IsCancellationRequested)
{
try
{
await InnerPoll(cancellationToken).ConfigureAwait(false);
}
catch (OperationCanceledException)
{
// ok, since the InnerPoll could observe the token
}
catch (Exception ex)
{
Logger.Warn("Failed to fetch timeouts from the timeout storage", ex);
await circuitBreaker.Failure(ex).ConfigureAwait(false);
}
}
}