This commit is contained in:
2021-02-20 12:21:44 +08:00
parent 69b98f171e
commit 4b19b62f9f
+3 -2
View File
@@ -128,8 +128,10 @@ abstract class Pool extends Component
return $client; return $client;
} }
if (Context::hasContext('create:connect:' . $coroutineName)) { if (Context::hasContext('create:connect:' . $coroutineName)) {
while ($client = Context::getContext($coroutineName)) {
Coroutine::sleep(0.001); Coroutine::sleep(0.001);
return $this->createConnect($config, $coroutineName, $createHandler); }
return $client;
} }
Context::setContext('create:connect:' . $coroutineName, 1); Context::setContext('create:connect:' . $coroutineName, 1);
@@ -206,7 +208,6 @@ abstract class Pool extends Component
} }
/** /**
* @return Channel[] * @return Channel[]
*/ */