This commit is contained in:
2020-09-05 03:08:39 +08:00
parent 3ac3de2562
commit 5ca5768f9f
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -43,6 +43,7 @@ abstract class Pool extends Component
*/
protected function get($name)
{
$this->debug('get connect.' . $this->size($name));
[$timeout, $connection] = $this->_items[$name]->pop();
if (!$this->checkCanUse($name, $timeout, $connection)) {
unset($client);
@@ -125,6 +126,7 @@ abstract class Pool extends Component
public function push($name, $client)
{
$this->_items[$name]->push([time(), $client]);
unset($client);
$this->debug('release connect.' . $this->size($name));
}