diff --git a/http-server/ServerCommand.php b/http-server/ServerCommand.php index 73aabf38..65e4f719 100644 --- a/http-server/ServerCommand.php +++ b/http-server/ServerCommand.php @@ -118,20 +118,6 @@ class ServerCommand extends Command $this->eventProvider->on(OnBeforeWorkerStart::class, [di(OnServerWorker::class), 'setConfigure']); $this->eventProvider->on(OnWorkerStart::class, [di(WorkerDispatch::class), 'dispatch']); $this->eventProvider->on(OnTaskerStart::class, [di(TaskerDispatch::class), 'dispatch']); - $this->eventProvider->on(OnAfterWorkerStart::class, function () { - $lists = HandlerManager::getHandlers(); - foreach ($lists as $list) { - Coroutine\go(function () use ($list) { - foreach ($list as $value) { - /** @var Handler|Closure $list */ - if ($value->callback instanceof \Closure) { - continue; - } - MiddlewareManager::add($value->callback[0], $value->callback[1], null); - } - }); - } - }); $manager->start(); }