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