改名
This commit is contained in:
@@ -172,7 +172,7 @@ class Connection extends Pool
|
||||
private function newClient($config, $coroutineName): PDO|null
|
||||
{
|
||||
$this->printClients($config['cds'], $coroutineName, true);
|
||||
return $this->createConnect($this->parseConfig($config, $coroutineName), $coroutineName, function ($cds, $username, $password, $charset, $coroutineName) {
|
||||
$this->createConnect($this->parseConfig($config, $coroutineName), $coroutineName, function ($cds, $username, $password, $charset, $coroutineName) {
|
||||
$link = new PDO($cds, $username, $password, [
|
||||
PDO::ATTR_EMULATE_PREPARES => false,
|
||||
PDO::ATTR_CASE => PDO::CASE_NATURAL,
|
||||
@@ -193,6 +193,7 @@ class Connection extends Pool
|
||||
}
|
||||
return $link;
|
||||
});
|
||||
return $this->get($coroutineName)[1];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class Redis extends Pool
|
||||
private function newClient($config, $coroutineName): \Redis|null
|
||||
{
|
||||
$this->printClients($config['host'], $coroutineName, true);
|
||||
return $this->createConnect([$config, $coroutineName], $coroutineName, function ($config, $coroutineName) {
|
||||
$this->createConnect([$config, $coroutineName], $coroutineName, function ($config, $coroutineName) {
|
||||
$redis = new SRedis();
|
||||
if (!$redis->connect($config['host'], (int)$config['port'], $config['timeout'])) {
|
||||
throw new RedisConnectException(sprintf('The Redis Connect %s::%d Fail.', $config['host'], $config['port']));
|
||||
@@ -90,6 +90,7 @@ class Redis extends Pool
|
||||
|
||||
return $redis;
|
||||
});
|
||||
return $this->get($coroutineName)[1];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user