diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 0527abd8..e923bb37 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -129,6 +129,9 @@ class Node extends HttpService if (empty($dispatchParam)) { $dispatchParam = [\request()]; } + if ($this->handler instanceof Closure) { + return call_user_func($this->handler, ...$dispatchParam); + } return \aop($this->handler, $dispatchParam); }; }