From 14e4be7e1d0f958eddd49d3da20e42aba7c814b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E8=AF=BAEno?= <895183594@qq.com> Date: Sat, 10 Aug 2024 08:01:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E6=B6=88=E8=B4=B9=E6=97=B6=E9=87=8D=E5=A4=8D=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E8=BF=9B=E7=A8=8B=E6=B1=A0stop=E7=9A=84=E6=93=8D=E4=BD=9C=20(#?= =?UTF-8?q?710)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../queue/src/Partial/SwooleBaseQueueConsumerPartial.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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