From 08e0b2b72313f2fe9c8bb55e5a2ae537cf34ac29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 29 Aug 2023 22:27:47 +0800 Subject: [PATCH] eee --- PoolItem.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PoolItem.php b/PoolItem.php index 7e22a19..7f511bf 100644 --- a/PoolItem.php +++ b/PoolItem.php @@ -23,9 +23,6 @@ class PoolItem private int $created = 0; - protected int $busy_total = 0; - protected int $idle_total = 0; - /** * @param int $maxCreated * @param Closure|array $callback @@ -122,7 +119,6 @@ class PoolItem $connection->stopHeartbeatCheck(); } $connection = null; - $this->created -= 1; } } @@ -142,8 +138,7 @@ class PoolItem */ public function pop(int $waite = 10): mixed { - if ($this->_items->isEmpty() && $this->created < $this->maxCreated) { - $this->created += 1; + if ($this->_items->isEmpty()) { return call_user_func($this->callback); } else { return $this->_items->pop($waite);