This commit is contained in:
2021-02-23 17:31:03 +08:00
parent 5e2cf4db18
commit 29fc384741
+2 -2
View File
@@ -38,8 +38,8 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
if (is_object($config)) {
return $config;
}
$object = $this->getFromChannel(md5($config), [$config, $construct]);
listen(Event::EVENT_AFTER_REQUEST, [$object, 'clean']);
$object = $this->getFromChannel($name = md5($config), [$config, $construct]);
listen(Event::EVENT_AFTER_REQUEST, [$this, 'release'], [$name, $object]);
return $object;
}