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

Breadcrumb

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

function RetryMiddleware::onRejected

Execute rejected closure

1 call to RetryMiddleware::onRejected()
RetryMiddleware::__invoke in vendor/guzzlehttp/guzzle/src/RetryMiddleware.php

File

vendor/guzzlehttp/guzzle/src/RetryMiddleware.php, line 97

Class

RetryMiddleware
Middleware that retries requests based on the boolean result of invoking the provided "decider" function.

Namespace

GuzzleHttp

Code

private function onRejected(RequestInterface $req, array $options) : callable {
    return function ($reason) use ($req, $options) {
        if (!($this->decider)($options['retries'], $req, null, $reason)) {
            return P\Create::rejectionFor($reason);
        }
        return $this->doRetry($req, $options);
    };
}

API Navigation

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