改名
This commit is contained in:
@@ -51,16 +51,7 @@ class OnWorkerStart extends Callback
|
|||||||
private function setWorkerAction($socket, $worker_id)
|
private function setWorkerAction($socket, $worker_id)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($socket instanceof Http) {
|
$this->debug(sprintf('Worker #%d is start.....', $worker_id));
|
||||||
$router = Snowflake::get()->router;
|
|
||||||
$router->loadRouterSetting();
|
|
||||||
} else if ($socket instanceof Websocket) {
|
|
||||||
$path = APP_PATH . 'app/Websocket';
|
|
||||||
|
|
||||||
/** @var AWebsocket $websocket */
|
|
||||||
$websocket = Snowflake::get()->annotation->register('websocket', AWebsocket::class);
|
|
||||||
$websocket->registration_notes($path, 'App\\Websocket');
|
|
||||||
}
|
|
||||||
$event = Snowflake::get()->event;
|
$event = Snowflake::get()->event;
|
||||||
if (!$event->exists(Event::SERVER_WORKER_START)) {
|
if (!$event->exists(Event::SERVER_WORKER_START)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user