shouldRetryError static method

bool shouldRetryError(
  1. UDXTransportException error,
  2. bool customShouldRetry(
    1. dynamic error
    )?
)

Determines if an error should be retried

Implementation

static bool shouldRetryError(
  UDXTransportException error,
  bool Function(dynamic error)? customShouldRetry,
) {
  // Use custom retry logic if provided
  if (customShouldRetry != null) {
    return customShouldRetry(error);
  }

  // Don't retry packet loss errors (they're permanent)
  if (error is UDXPacketLossException) {
    return false;
  }

  // Retry transient errors
  return error.isTransient;
}