This commit is contained in:
2023-04-05 22:09:13 +08:00
parent dd65dfbd17
commit 582583cd32
+3 -4
View File
@@ -155,11 +155,10 @@ class Connection extends Component
*/ */
public function getMasterClient(): PDO public function getMasterClient(): PDO
{ {
$client = $this->connection->get($this->cds); if (($client = $this->connection->get($this->cds)) instanceof PDO) {
if ($client === false) { return $client;
throw new Exception('waite db client timeout.');
} }
return $client; throw new Exception('waite db client timeout.');
} }
/** /**