From 4b19b62f9ff2de95bbfa67e0f81ac3a6ae1e642f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 20 Feb 2021 12:21:44 +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, 4 insertions(+), 3 deletions(-) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index 30ae1f75..1bfdf367 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -128,8 +128,10 @@ abstract class Pool extends Component return $client; } if (Context::hasContext('create:connect:' . $coroutineName)) { - Coroutine::sleep(0.001); - return $this->createConnect($config, $coroutineName, $createHandler); + while ($client = Context::getContext($coroutineName)) { + Coroutine::sleep(0.001); + } + return $client; } Context::setContext('create:connect:' . $coroutineName, 1); @@ -206,7 +208,6 @@ abstract class Pool extends Component } - /** * @return Channel[] */