This commit is contained in:
2023-08-16 12:27:03 +08:00
parent e5c5ce822c
commit aa14ff3376
+3 -3
View File
@@ -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();
} }