This commit is contained in:
as2252258@163.com
2021-04-23 03:25:03 +08:00
parent 0c5e05b6a2
commit a5a607495f
11 changed files with 261 additions and 248 deletions
+5 -2
View File
@@ -26,6 +26,11 @@ class OnConnect extends Callback
*/
public function onHandler(Server $server, int $fd, int $reactorId)
{
defer(function () {
fire(Event::SYSTEM_RESOURCE_RELEASES);
logger_insert();
});
$event = Snowflake::app()->getEvent();
$clientInfo = $server->getClientInfo($fd);
@@ -37,8 +42,6 @@ class OnConnect extends Callback
} catch (\Throwable $throwable) {
$this->addError($throwable, 'connect');
}
fire(Event::SYSTEM_RESOURCE_RELEASES);
logger_insert();
}