From 7a570c13768890fbcc3b1b259fc44a4a6633a8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 5 Jan 2021 16:32:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Abstracts/Pool.php | 3 +++ System/Pool/Redis.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index 84e00451..e22016eb 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -166,6 +166,7 @@ abstract class Pool extends Component /** * @param string $name + * @throws Exception */ public function clean(string $name) { @@ -175,6 +176,8 @@ abstract class Pool extends Component $channel = $this->_items[$name]; while ([$time, $client] = $channel->pop(0.001)) { unset($client); + + $this->desc($name); } } diff --git a/System/Pool/Redis.php b/System/Pool/Redis.php index f8f155b6..9f2606a9 100644 --- a/System/Pool/Redis.php +++ b/System/Pool/Redis.php @@ -137,7 +137,7 @@ class Redis extends Pool return; } - $this->_create -= 1; + $this->desc($coroutineName); $this->remove($coroutineName); $this->clean($coroutineName);