in src/Utils/ExponentialBackoff.php [82:101]
public function execute(callable $function, array $arguments = [])
{
$delayFunction = $this->delayFunction;
$calcDelayFunction = $this->calcDelayFunction ?: [$this, 'calculateDelay'];
$exception = null;
while (true) {
try {
return call_user_func_array($function, $arguments);
} catch (\Exception $exception) {
if (!$this->shouldRetry($exception)) {
throw $exception;
}
$delayFunction($calcDelayFunction($this->retryAttempt));
}
}
throw $exception;
}