This commit is contained in:
2021-02-23 14:17:56 +08:00
parent 9e6ac6d92d
commit c0cd71efe9
2 changed files with 3 additions and 19 deletions
-13
View File
@@ -488,19 +488,6 @@ class Server extends HttpService
$event->on(Event::SERVER_WORKER_START, function () {
$attributes = Snowflake::app()->getAttributes();
$attributes->readControllers(SOCKET_PATH, 'App\Websocket', 'sockets');
$aliases = $attributes->getAlias('sockets');
if (count($aliases) < 1) {
return;
}
foreach ($aliases as $alias) {
$handler = $alias['handler'];
foreach ($alias['attributes'] as $key => $attribute) {
if ($attribute instanceof IAnnotation) {
$attribute->execute($handler);
}
}
}
});
}