This commit is contained in:
2021-02-20 15:21:42 +08:00
parent 60805d5f4c
commit 52bf002be5
14 changed files with 20 additions and 46 deletions
+2 -2
View File
@@ -70,8 +70,8 @@ class Connection extends Component
public function init()
{
$event = Snowflake::app()->getEvent();
$event->on(Event::RELEASE_ALL, [$this, 'disconnect']);
$event->on(Event::EVENT_AFTER_REQUEST, [$this, 'clear_connection']);
$event->on(Event::SYSTEM_RESOURCE_CLEAN, [$this, 'disconnect']);
$event->on(Event::SYSTEM_RESOURCE_RELEASES, [$this, 'clear_connection']);
}