This commit is contained in:
2023-08-16 16:43:24 +08:00
parent 62b7d86b45
commit e357c02978
+1 -1
View File
@@ -141,7 +141,7 @@ class PoolItem
*/ */
public function pop(int $waite = 10): mixed public function pop(int $waite = 10): mixed
{ {
if ($this->_items->isEmpty() && $this->created >= $this->maxCreated) { if ($this->_items->isEmpty() && $this->created < $this->maxCreated) {
$this->created += 1; $this->created += 1;
return call_user_func($this->callback); return call_user_func($this->callback);
} else { } else {