Пример #1
0
 /**
  * @param PromiseInterface $promise
  * @param Error|Exception|LazyException $ex
  */
 protected function retryOrReset(PromiseInterface $promise, $ex)
 {
     if ($ex instanceof TaskIncompleteException) {
         $this->counter = 1;
         $this->channel->getLoop()->afterTick(function () use($promise) {
             $this->send($promise);
         });
         return;
     }
     $this->retry($promise);
 }