This commit is contained in:
2020-09-05 02:31:08 +08:00
parent e596942974
commit eaf3fb3c75
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ abstract class Pool extends Component
*/
protected function get($name)
{
[$timeout, $connection] = $this->_items[$name]->pop(1);
[$timeout, $connection] = $this->_items[$name]->pop();
if (!$this->checkCanUse($name, $timeout, $connection)) {
unset($client);
return [0, null];
+3 -3
View File
@@ -265,9 +265,9 @@ class Connection extends Pool
public function checkCanUse($name, $time, $connect)
{
try {
if ($time + 60 * 10 < time()) {
return $result = false;
}
// if ($time + 60 * 10 < time()) {
// return $result = false;
// }
if (empty($connect) || !($connect instanceof PDO)) {
return $result = false;
}