From f5b2fe563f7567305b31e4fcaea66f47350ea083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 15 Feb 2021 20:26:32 +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, 1 insertion(+), 6 deletions(-) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index 93ac1ed9..3b09ec21 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -129,16 +129,11 @@ abstract class Pool extends Component return $this->get($coroutineName)[1]; } if (Context::hasContext('create:connect:' . $coroutineName)) { - return $this->get($coroutineName)[1]; + return null; } Context::setContext('create:connect:' . $coroutineName, 1); $client = call_user_func($createHandler, ...$config); - if (!Context::inCoroutine()) { - Context::deleteId('create:connect:' . $coroutineName); - return $client; - } - $this->push($coroutineName, $client); Context::deleteId('create:connect:' . $coroutineName);