This commit is contained in:
2021-02-24 14:12:58 +08:00
parent c82e90ae87
commit c704dc05eb
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -54,12 +54,13 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
* @param string $name
* @param mixed $config
* @return mixed
* @throws ReflectionException
* @throws NotFindClassException
*/
public function createClient(string $name, mixed $config): mixed
{
return Snowflake::createObject(...$config);
if (isset($config[1])) {
return new $config[0](...$config[1]);
}
return new $config[0]();
}