From adfff248e729e509ab88c694ee2e993b24cc92ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 15 Feb 2021 10:59:13 +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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index a91761eb..661adfe1 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -42,6 +42,8 @@ abstract class Pool extends Component $this->max = (int)$max; } + + /** * @param $name * @return array @@ -52,7 +54,7 @@ abstract class Pool extends Component if (!Context::inCoroutine()) { return [0, null]; } - [$timeout, $connection] = $this->_items[$name]->pop(30); + [$timeout, $connection] = $this->_items[$name]->pop(-1); if (empty($timeout) || empty($connection)) { return [0, null]; } @@ -63,6 +65,8 @@ abstract class Pool extends Component } } + + /** * @param $cds * @param false $isMaster @@ -133,6 +137,7 @@ abstract class Pool extends Component Context::deleteId('create:connect:' . $coroutineName); return $client; } + $this->push($coroutineName, $client); Context::deleteId('create:connect:' . $coroutineName);