Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 protected function doDelay(InternalRequestInterface $request)
 {
     if ($this->hasDelayCallback()) {
         return call_user_func($this->delayCallback, $request);
     }
     return parent::doDelay($request);
 }
Esempio n. 2
0
 /**
  * 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);
 }