diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 5c456cc7..339ed0cb 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -87,6 +87,8 @@ class Router extends HttpService implements RouterInterface if (!method_exists($_closure, $method)) { throw new NotFindClassException($closure . '::' . $method); } + + $closure = [$closure, $method]; } $this->addRoute('add-port-listen/port_' . $port, $closure, 'listen'); }