改名
This commit is contained in:
@@ -129,16 +129,11 @@ abstract class Pool extends Component
|
|||||||
return $this->get($coroutineName)[1];
|
return $this->get($coroutineName)[1];
|
||||||
}
|
}
|
||||||
if (Context::hasContext('create:connect:' . $coroutineName)) {
|
if (Context::hasContext('create:connect:' . $coroutineName)) {
|
||||||
return $this->get($coroutineName)[1];
|
return null;
|
||||||
}
|
}
|
||||||
Context::setContext('create:connect:' . $coroutineName, 1);
|
Context::setContext('create:connect:' . $coroutineName, 1);
|
||||||
|
|
||||||
$client = call_user_func($createHandler, ...$config);
|
$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);
|
Context::deleteId('create:connect:' . $coroutineName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user