diff --git a/http-handler/Handler.php b/http-handler/Handler.php index 9730dcb4..78bd091e 100644 --- a/http-handler/Handler.php +++ b/http-handler/Handler.php @@ -39,10 +39,10 @@ class Handler $dispatcher = Kiri::getDi()->get(EventProvider::class); $dispatcher->on(OnAfterWorkerStart::class, function () { - if ($this->route instanceof Closure) { + if ($this->callback instanceof Closure) { return; } - $this->_middlewares = MiddlewareManager::get($this->route); + $this->_middlewares = MiddlewareManager::get($this->callback); }); }