This commit is contained in:
2023-04-05 11:17:55 +08:00
parent 5d2ffd3aa6
commit d8863f79a7
+5 -1
View File
@@ -102,8 +102,12 @@ class PoolItem
public function pop(int $waite = 10): mixed public function pop(int $waite = 10): mixed
{ {
if ($this->created < $this->maxCreated) { if ($this->created < $this->maxCreated) {
$callback = $this->callback;
$client = $callback();
$this->created += 1; $this->created += 1;
return call_user_func($this->callback);
return $client;
} }
return $this->_items->pop($waite); return $this->_items->pop($waite);
} }