...
|
...
|
@@ -38,6 +38,14 @@ class DbPool { |
|
|
if(!$this->client){
|
|
|
$this->connect();
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
// 判断是否链接中
|
|
|
$this->client->getAttribute(\PDO::ATTR_SERVER_INFO);
|
|
|
}catch (\Throwable $e){
|
|
|
$this->connect();
|
|
|
}
|
|
|
|
|
|
$this->lastTimer = time();
|
|
|
return $this->client;
|
|
|
}
|
...
|
...
|
|