变更
This commit is contained in:
@@ -154,7 +154,10 @@ class Connection extends Component
|
|||||||
{
|
{
|
||||||
return function () use ($config) {
|
return function () use ($config) {
|
||||||
if ($this->total >= 300) {
|
if ($this->total >= 300) {
|
||||||
return $this->pool->waite($config['cds'], 30);
|
$connect = $this->pool->waite($config['cds'], 30);
|
||||||
|
if ($connect === false) {
|
||||||
|
throw new Exception("Get database link wait timeout.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$this->total += 1;
|
$this->total += 1;
|
||||||
return new \Database\Mysql\PDO($config);
|
return new \Database\Mysql\PDO($config);
|
||||||
|
|||||||
Reference in New Issue
Block a user