shouldRetryError static method
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;
}