in src/Microsoft.Azure.NotificationHubs/BasicRetryPolicy.cs [118:144]
private static bool ShouldRetryException(Exception exception)
{
if (exception is TaskCanceledException || exception is OperationCanceledException)
{
exception = exception?.InnerException;
}
else if (exception is AggregateException aggregateEx)
{
exception = aggregateEx?.Flatten().InnerException;
}
switch (exception)
{
case null:
return false;
case MessagingException ex:
return ex.IsTransient;
case TimeoutException _:
case SocketException _:
return true;
default:
return false;
}
}