改名
This commit is contained in:
@@ -43,7 +43,7 @@ abstract class Pool extends Component
|
|||||||
*/
|
*/
|
||||||
protected function get($name)
|
protected function get($name)
|
||||||
{
|
{
|
||||||
[$timeout, $connection] = $this->_items[$name]->pop(1);
|
[$timeout, $connection] = $this->_items[$name]->pop();
|
||||||
if (!$this->checkCanUse($name, $timeout, $connection)) {
|
if (!$this->checkCanUse($name, $timeout, $connection)) {
|
||||||
unset($client);
|
unset($client);
|
||||||
return [0, null];
|
return [0, null];
|
||||||
|
|||||||
@@ -265,9 +265,9 @@ class Connection extends Pool
|
|||||||
public function checkCanUse($name, $time, $connect)
|
public function checkCanUse($name, $time, $connect)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($time + 60 * 10 < time()) {
|
// if ($time + 60 * 10 < time()) {
|
||||||
return $result = false;
|
// return $result = false;
|
||||||
}
|
// }
|
||||||
if (empty($connect) || !($connect instanceof PDO)) {
|
if (empty($connect) || !($connect instanceof PDO)) {
|
||||||
return $result = false;
|
return $result = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user