From 66dfa660d590a21c22e61a81ccf89b55af639b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 28 Apr 2021 12:06:11 +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 +++ 1 file changed, 3 insertions(+) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index c366078a..249d218a 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -168,6 +168,9 @@ abstract class Pool extends Component if (!Context::inCoroutine()) { return $this->createClient($name, $callback); } + if (!isset($this->_items[$name])) { + $this->_items[$name] = new Channel($this->max); + } if ($this->_items[$name]->isEmpty()) { $this->createByCallback($name, $callback); }