Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PsrUtils.php

function PsrUtils::retryDelay

Parameters

int $retry zero-indexed attempt number:

int $retryDelay initial delay in milliseconds:

ResponseInterface|null $response response of failed request:

Return value

float delay in seconds

1 call to PsrUtils::retryDelay()
PsrTransport::send in vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php
@psalm-suppress ArgumentTypeCoercion

File

vendor/open-telemetry/sdk/Common/Export/Http/PsrUtils.php, line 37

Class

PsrUtils
@internal

Namespace

OpenTelemetry\SDK\Common\Export\Http

Code

public static function retryDelay(int $retry, int $retryDelay, ?ResponseInterface $response = null) : float {
    $delay = $retryDelay << $retry;
    $delay = rand($delay >> 1, $delay) / 1000;
    return max($delay, self::parseRetryAfter($response));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal