/** * {@inheritdoc} */ protected function doDelay(InternalRequestInterface $request) { if ($this->hasDelayCallback()) { return call_user_func($this->delayCallback, $request); } return parent::doDelay($request); }
/** * Creates a limited retry strategy. * * @param integer $limit The limit. * @param \Ivory\HttpAdapter\Event\Retry\Strategy\RetryStrategyChainInterface|null $next The next retry strategy chain. */ public function __construct($limit = 3, RetryStrategyChainInterface $next = null) { parent::__construct($next); $this->setLimit($limit); }