This commit is contained in:
2021-04-19 16:33:58 +08:00
parent 0506a151de
commit f6d9ad21c4
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -5,6 +5,7 @@ namespace Annotation\Route;
use Annotation\Attribute; use Annotation\Attribute;
use Exception;
use HttpServer\Route\Router; use HttpServer\Route\Router;
use ReflectionException; use ReflectionException;
use Snowflake\Exception\ComponentException; use Snowflake\Exception\ComponentException;
@@ -41,7 +42,7 @@ use Snowflake\Snowflake;
/** /**
* @param array $handler * @param array $handler
* @return Router * @return Router
* @throws \Exception * @throws Exception
*/ */
public function execute(array $handler): Router public function execute(array $handler): Router
{ {
@@ -50,7 +51,6 @@ use Snowflake\Snowflake;
$method = $this->event . '::' . (is_null($this->uri) ? 'event' : $this->uri); $method = $this->event . '::' . (is_null($this->uri) ? 'event' : $this->uri);
var_dump($method);
$router->addRoute($method, $handler, 'sw::socket'); $router->addRoute($method, $handler, 'sw::socket');
return $router; return $router;
-1
View File
@@ -139,7 +139,6 @@ class OnHandshake extends Callback
$sRequest->parseUri(); $sRequest->parseUri();
if (($node = $router->find_path($sRequest)) === null) { if (($node = $router->find_path($sRequest)) === null) {
var_dump($node);
return $this->disconnect($response, 404); return $this->disconnect($response, 404);
} }
return $node->dispatch($sRequest, Response::create($response)); return $node->dispatch($sRequest, Response::create($response));