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