改名
This commit is contained in:
@@ -7,6 +7,7 @@ namespace HttpServer\Events;
|
||||
use Annotation\Route\Socket;
|
||||
use Exception;
|
||||
use HttpServer\Abstracts\Callback;
|
||||
use HttpServer\Http\Context;
|
||||
use Snowflake\Event;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
use Snowflake\Snowflake;
|
||||
@@ -63,7 +64,8 @@ class OnMessage extends Callback
|
||||
throw new Exception('Format error.');
|
||||
}
|
||||
$router = Snowflake::app()->getRouter();
|
||||
$node = $router->search('/' . Socket::MESSAGE . '::' . $route, 'sw::socket');
|
||||
|
||||
$node = $router->tree_search(explode('/', Socket::MESSAGE . '::' . $route), 'sw::socket');
|
||||
if ($node === null) {
|
||||
throw new Exception('Page not found.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user