protected function retryOrReset(PromiseInterface $promise, $ex) { if ($ex instanceof TaskIncompleteException) { $this->counter = 1; $this->channel->getLoop()->onTick(function () use($promise) { $this->send($promise); }); return; } $this->retry($promise); }