shouldRetry method

bool shouldRetry(
  1. int attempt
)

Whether another retry is allowed after attempt failures.

With maxAttempts: 3: fail #1 → retry, fail #2 → retry, fail #3 → false (3 total attempts, matching v1's documented behavior). maxAttempts: 0 disables retries entirely.

Implementation

bool shouldRetry(int attempt) => attempt < _config.maxAttempts;