From cba75d419d273368d81706cf514ed856f714b337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 11 Jul 2022 16:21:51 +0800 Subject: [PATCH] modify plugin name --- kiri-engine/Pool/Pool.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kiri-engine/Pool/Pool.php b/kiri-engine/Pool/Pool.php index c07606d0..999129bf 100644 --- a/kiri-engine/Pool/Pool.php +++ b/kiri-engine/Pool/Pool.php @@ -88,14 +88,19 @@ class Pool extends Component $success = 0; $lists = []; $count = $channel->length(); - while (($pdo = $channel->pop()) instanceof PDO) { + while ($this->status->is(StatusEnum::EXIT) === false) { + $pdo = $channel->pop(); if ($pdo->check()) { $success += 1; } $lists[] = $pdo; } - foreach ($lists as $list) { - $channel->push($list); + if ($this->status->is(StatusEnum::EXIT) === false) { + foreach ($lists as $list) { + $channel->push($list); + } + } else { + $channel->close(); } return [$count, $success]; }