变更
This commit is contained in:
+3
-4
@@ -155,11 +155,10 @@ 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;
|
||||
}
|
||||
return $client;
|
||||
throw new Exception('waite db client timeout.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user