/home/techb158/ileadtechnology.com/SSM/vendor/guzzlehttp/guzzle/src
NameSizeModeActions
Cookie/-0755rm
Exception/-0755rm
Handler/-0755rm
Client.php194210644editdlrm
ClientInterface.php28640644editdlrm
functions.php99280644editdlrm
functions_include.php1600644editdlrm
HandlerStack.php77680644editdlrm
MessageFormatter.php72620644editdlrm
Middleware.php98920644editdlrm
Pool.php48360644editdlrm
PrepareBodyMiddleware.php32240644editdlrm
RedirectMiddleware.php82820644editdlrm
RequestOptions.php103560644editdlrm
RetryMiddleware.php35030644editdlrm
TransferStats.php31150644editdlrm
UriTemplate.php81180644editdlrm
Utils.php21000644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php (3503B)
decider = $decider; $this->nextHandler = $nextHandler; $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; } /** * Default exponential backoff delay function. * * @param int $retries * * @return int milliseconds. */ public static function exponentialDelay($retries) { return (int) pow(2, $retries - 1) * 1000; } /** * @param RequestInterface $request * @param array $options * * @return PromiseInterface */ public function __invoke(RequestInterface $request, array $options) { if (!isset($options['retries'])) { $options['retries'] = 0; } $fn = $this->nextHandler; return $fn($request, $options) ->then( $this->onFulfilled($request, $options), $this->onRejected($request, $options) ); } /** * Execute fulfilled closure * * @return mixed */ private function onFulfilled(RequestInterface $req, array $options) { return function ($value) use ($req, $options) { if (!call_user_func( $this->decider, $options['retries'], $req, $value, null )) { return $value; } return $this->doRetry($req, $options, $value); }; } /** * Execute rejected closure * * @return callable */ private function onRejected(RequestInterface $req, array $options) { return function ($reason) use ($req, $options) { if (!call_user_func( $this->decider, $options['retries'], $req, null, $reason )) { return \GuzzleHttp\Promise\rejection_for($reason); } return $this->doRetry($req, $options); }; } /** * @return self */ private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) { $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); return $this($request, $options); } }