From d8863f79a7861d36212fa0055db052919f0e2368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 5 Apr 2023 11:17:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-engine/Pool/PoolItem.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kiri-engine/Pool/PoolItem.php b/kiri-engine/Pool/PoolItem.php index 3078dc72..b9a646cf 100644 --- a/kiri-engine/Pool/PoolItem.php +++ b/kiri-engine/Pool/PoolItem.php @@ -102,8 +102,12 @@ class PoolItem public function pop(int $waite = 10): mixed { if ($this->created < $this->maxCreated) { + $callback = $this->callback; + $client = $callback(); + $this->created += 1; - return call_user_func($this->callback); + + return $client; } return $this->_items->pop($waite); }