qqq
This commit is contained in:
+3
-3
@@ -135,7 +135,7 @@ class Connection extends Component
|
|||||||
public function getConnection(): PDO
|
public function getConnection(): PDO
|
||||||
{
|
{
|
||||||
if (!$this->inTransaction()) {
|
if (!$this->inTransaction()) {
|
||||||
return $this->checkClientHealth();
|
return $this->getNormalClientHealth();
|
||||||
} else {
|
} else {
|
||||||
return $this->getTransactionClient();
|
return $this->getTransactionClient();
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ class Connection extends Component
|
|||||||
* @return PDO
|
* @return PDO
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function checkClientHealth(): PDO
|
protected function getNormalClientHealth(): PDO
|
||||||
{
|
{
|
||||||
/** @var PDO $client */
|
/** @var PDO $client */
|
||||||
$client = $this->pool()->get($this->cds);
|
$client = $this->pool()->get($this->cds);
|
||||||
@@ -154,7 +154,7 @@ class Connection extends Component
|
|||||||
return $client;
|
return $client;
|
||||||
}
|
}
|
||||||
Waite::sleep(10);
|
Waite::sleep(10);
|
||||||
return $this->checkClientHealth();
|
return $this->getNormalClientHealth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user