Skip to content

Commit

Permalink
Properly cancel timer
Browse files Browse the repository at this point in the history
  • Loading branch information
holtkamp authored Dec 10, 2018
1 parent 13ae05c commit d4f5cba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function timerStatistics(Timer $timer): void
);

if (($countQueue + $countRunning) === 0) {
$timer->cancel();
$this->getLoop()->cancelTimer($timer);
}
}

Expand All @@ -135,7 +135,7 @@ public function run(): void
if ($this->targetManager->hasFreeSlots()) {
$this->spawnBundle();
} elseif ($this->targetManager->noMoreUrlsToProcess()) {
$timer->cancel();
$this->getLoop()->cancelTimer($timer);
}
});

Expand Down

0 comments on commit d4f5cba

Please sign in to comment.