From f724d14b31f1737ef3142fa2195043873fd0d90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 24 Sep 2021 18:54:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-server/ServerCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-server/ServerCommand.php b/http-server/ServerCommand.php index bbe0534d..dc4b9e36 100644 --- a/http-server/ServerCommand.php +++ b/http-server/ServerCommand.php @@ -122,10 +122,10 @@ class ServerCommand extends Command $this->eventProvider->on(OnAfterWorkerStart::class, function () { $lists = HandlerManager::dump(); foreach ($lists as $list) { - if ($list instanceof \Closure) { + /** @var Handler|Closure $list */ + if ($list->callback instanceof \Closure) { continue; } - /** @var Handler|Closure $list */ MiddlewareManager::add($list->callback[0], $list->callback[1], null); } });