This commit is contained in:
as2252258@163.com
2021-02-23 00:40:51 +08:00
parent e053deae39
commit 4615d58247
+10 -3
View File
@@ -17,6 +17,15 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
{
/**
* set pool max length
*/
public function init()
{
$this->max = 100;
}
/**
* @param array $config
* @param bool $isMaster
@@ -25,9 +34,7 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
*/
public function getConnection(array $config, bool $isMaster): mixed
{
$config[0] = md5($config[0]);
$this->max = 100;
return $this->get($config[0], $config);
return $this->get(md5($config[0]), $config);
}