Skip to content

Commit

Permalink
Additional stopped check
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Dec 7, 2024
1 parent 607623a commit 883521f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EventLoop/Internal/AbstractDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public function __construct()
$this->queueCallback = $this->queue(...);
$this->runCallback = function (): ?\Closure {
do {
if ($this->stopped) {
return null;
}

if ($this->fiber->isTerminated()) {
$this->createLoopFiber();
}
Expand Down

0 comments on commit 883521f

Please sign in to comment.