diff --git a/src/Components/queue/src/Partial/SwooleBaseQueueConsumerPartial.php b/src/Components/queue/src/Partial/SwooleBaseQueueConsumerPartial.php index c812054f0c..a7496ab354 100644 --- a/src/Components/queue/src/Partial/SwooleBaseQueueConsumerPartial.php +++ b/src/Components/queue/src/Partial/SwooleBaseQueueConsumerPartial.php @@ -90,11 +90,11 @@ public function run(ITaskParam $param) */ public function stop(): void { - $this->working = false; - if ($this->coPool) + if ($this->working) { $this->coPool->stop(); } + $this->working = false; } protected function task(QueueConfig $config): void