From 788cb631e08aa2708b69822e489fa72673d5bc58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sun, 26 Sep 2021 16:03:55 +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-handler/Handler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http-handler/Handler.php b/http-handler/Handler.php index bd575866..9730dcb4 100644 --- a/http-handler/Handler.php +++ b/http-handler/Handler.php @@ -39,6 +39,9 @@ class Handler $dispatcher = Kiri::getDi()->get(EventProvider::class); $dispatcher->on(OnAfterWorkerStart::class, function () { + if ($this->route instanceof Closure) { + return; + } $this->_middlewares = MiddlewareManager::get($this->route); }); }