This commit is contained in:
2020-09-05 01:56:35 +08:00
parent 39aa1c2237
commit 6cff229b6a
+3
View File
@@ -43,6 +43,9 @@ abstract class Pool extends Component
*/
protected function get($name)
{
if ($this->_items[$name]->length() < 1) {
return [0, null];
}
[$timeout, $connection] = $this->_items[$name]->pop();
if (!$this->checkCanUse($name, $timeout, $connection)) {
unset($client);