This commit is contained in:
2021-02-03 18:53:14 +08:00
parent b62a6b51f4
commit a04e120424
+3 -1
View File
@@ -53,8 +53,10 @@ abstract class Pool extends Component
return [0, null]; return [0, null];
} }
[$timeout, $connection] = $this->_items[$name]->pop(30); [$timeout, $connection] = $this->_items[$name]->pop(30);
if (empty($timeout) || empty($connection)) {
return [0, null];
}
if (!$this->checkCanUse($name, $timeout, $connection)) { if (!$this->checkCanUse($name, $timeout, $connection)) {
unset($client);
return [0, null]; return [0, null];
} else { } else {
return [$timeout, $connection]; return [$timeout, $connection];