变更
This commit is contained in:
+3
-4
@@ -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.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user