getRetryDelay function

int getRetryDelay(
  1. int attempt
)

Compute retry delay with exponential backoff.

Implementation

int getRetryDelay(int attempt) {
  // Exponential backoff: 1s, 2s, 4s, ...
  return 1000 * (1 << (attempt - 1));
}