This commit is contained in:
2021-02-24 14:25:24 +08:00
parent cb07c7f1ea
commit 17058e9e41
+2 -3
View File
@@ -25,14 +25,13 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
* ObjectPool constructor.
* @param array $config
* @throws ComponentException
* @throws Exception
*/
public function __construct($config = [])
{
$this->max = 5000;
$event = Snowflake::app()->getEvent();
$event->on(Event::EVENT_AFTER_REQUEST, [$this, 'destruct']);
listen(Event::EVENT_AFTER_REQUEST, [$this, 'destruct']);
parent::__construct($config);
}